/* ════════════════════════════════════════════════════════════════════
   VYLO — dashboard design system (estilo ggCheckout)
   ──────────────────────────────────────────────────────────────────── */

:root {
  /* ── surfaces (piano black) ──────────────────────────────── */
  /* hierarquia mais sutil: sidebar (mais escura) → main → cards          */
  --bg:           #06070a;       /* área principal — igualada à sidebar */
  --bg-1:         #08090c;
  --bg-2:         #10131a;
  --bg-elev:      #06070a;       /* sidebar — preto profundo */
  --bg-card:      #11131a;       /* cards — sutilmente mais claro */
  --bg-input:     #06070a;       /* search alinhada c/ sidebar */
  --bg-pill:      #161922;
  --bg-hover:     #181b25;

  /* ── lines ──────────────────────────────── */
  --line:         rgba(255, 255, 255, 0.06);
  --line-hi:      rgba(255, 255, 255, 0.12);

  /* ── text ──────────────────────────────── */
  --t-1:          #ffffff;
  --t-2:          #d1d5db;
  --t-3:          #9aa3b2;
  --t-4:          #6b7280;

  /* ── accent (azul céu, suave) ──────────────────────────────── */
  --b-300:        #93bdf9;
  --b-400:        #5b97f5;
  --b-500:        #3b82f6;
  --b-glow:       rgba(91, 151, 245, 0.32);

  /* ── KPI gradients ──────────────────────────────── */
  --g-green-1:    #34d399;
  --g-green-2:    #10b981;
  --g-emerald-1:  #4ade80;
  --g-emerald-2:  #16a34a;
  --g-orange-1:   #fb923c;
  --g-orange-2:   #f97316;
  --g-red-1:      #f87171;
  --g-red-2:      #ef4444;

  /* ── status ──────────────────────────────── */
  --up:           #22c55e;
  --down:         #ef4444;
  --warn:         #f59e0b;

  /* ── platform ──────────────────────────────── */
  --p-tiktok:     #ff3b6e;
  --p-meta:       #4f86ff;
  --p-google:     #fbbf24;
  --p-direct:     #94a3b8;

  --r-sm:         8px;
  --r-md:         10px;
  --r-lg:         14px;
  --r-xl:         18px;
  --r-2xl:        22px;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--t-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--b-400); color: #fff; }

.num, [data-mono] {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: 'tnum', 'zero';
}

/* ════════════════════════════════════════════════════════════════
   BRAND MARK
   ════════════════════════════════════════════════════════════════ */
.brand {
  display: inline-flex; align-items: center; gap: 6px;
  user-select: none;
}
.brand-mark {
  width: 66px; height: 66px;
  object-fit: contain;
  display: block;
  margin: -10px 0;
}
.brand-mark svg { display: none; }
.brand-name {
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.02em;
  color: var(--t-1);
}

/* ════════════════════════════════════════════════════════════════
   AUTH
   ════════════════════════════════════════════════════════════════ */
/* fundo único pra página toda: glows azul/roxo + grade quadriculada */
body.auth {
  background:
    radial-gradient(900px 480px at 14% 6%, rgba(91,151,245,0.16), transparent 55%),
    radial-gradient(820px 600px at 88% 96%, rgba(124,58,237,0.16), transparent 55%),
    #080910;
}
.auth-split { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-split::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; opacity: .11; pointer-events: none;
}

/* ── painel esquerdo (marca) — transparente, sem divisória ── */
.auth-side {
  position: relative; z-index: 1; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 48px;
}
/* logo grande no painel (largura travada, altura automática = sem distorção) */
.auth-logo { width: 300px; max-width: 80%; height: auto; display: block; position: relative; z-index: 1; }
.auth-side-mid { position: relative; z-index: 1; max-width: 440px; }
.auth-tagline { font-size: 30px; font-weight: 800; line-height: 1.18; letter-spacing: -0.02em; color: var(--t-1); margin-bottom: 26px; }
.auth-tagline b { background: linear-gradient(90deg, var(--b-300), #a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-feats { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-feat { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--t-2); }
.auth-feat-ic { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: rgba(34,197,94,0.14); color: var(--up); }
.auth-feat-ic svg { width: 15px; height: 15px; }
.auth-side-foot { position: relative; z-index: 1; font-size: 12px; color: var(--t-4); }

/* ── painel direito (formulário) ── */
.auth-main { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; background: rgba(10,12,20,0.6); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 34px 32px 28px; backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -24px rgba(0,0,0,0.6); }
.auth-head { margin-bottom: 24px; }
/* marca compacta no topo do formulário (sempre visível) */
.auth-card-brand { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 22px; }
.auth-card-brand img { height: 42px; width: auto; }
.auth-card-brand span { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--t-1); }
.auth-forgot { text-align: right; margin: -6px 0 16px; }
.auth-forgot a { font-size: 12.5px; color: var(--t-3); }
.auth-forgot a:hover { color: var(--b-300); }
.auth-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--t-1); }
.auth-head p { margin: 0; color: var(--t-3); font-size: 14px; }
.auth-err {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #fecaca;
  border-radius: var(--r-md);
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-head .auth-mobile-logo { display: inline-flex; }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-size: 12px; color: var(--t-3); font-weight: 500;
}
.field input {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  color: var(--t-1);
  font: inherit; font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover { border-color: var(--line-hi); }
.field input:focus {
  border-color: var(--b-400);
  background: var(--bg-1);
  box-shadow: 0 0 0 3px rgba(91, 151, 245, 0.14);
}
.field .hint { font-size: 11.5px; color: var(--t-4); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s, filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--b-400) 0%, var(--b-500) 100%);
  color: #fff;
  box-shadow: 0 8px 22px -10px var(--b-glow), 0 1px 0 rgba(255,255,255,0.18) inset;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-block { width: 100%; }

.auth-foot {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px; color: var(--t-3);
}
.auth-foot a { color: var(--b-300); font-weight: 500; }
.auth-foot a:hover { color: var(--b-400); }

/* ════════════════════════════════════════════════════════════════
   APP LAYOUT
   ════════════════════════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

/* ──────────── SIDEBAR ──────────── */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  padding: 14px 11px 11px;
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
  /* esconde a scrollbar nativa, mantém o scroll funcional */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge antigo */
}
.sidebar::-webkit-scrollbar { display: none; }  /* Chrome/Safari/Edge */

.sidebar-head {
  padding: 4px 4px 12px;
}
.workspace-pick {
  margin-top: 12px;
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--t-1);
  cursor: pointer;
  width: 100%;
  transition: border-color .15s, background .15s;
}
.workspace-pick:hover { border-color: var(--line-hi); background: var(--bg-2); }
.workspace-pick svg { color: var(--t-3); }
.workspace-pick .wp-ic {
  width: 14px; height: 14px; flex: 0 0 14px;
  color: var(--t-2);
}
.workspace-pick .wp-name {
  flex: 1; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.workspace-pick .wp-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px;
  padding: 0 5px;
  font-size: 10.5px; font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: rgba(91, 151, 245, 0.14);
  color: var(--b-300);
  border-radius: 999px;
  letter-spacing: 0;
}
.workspace-pick .wp-chev { width: 12px; height: 12px; flex: 0 0 12px; color: var(--t-3); }

.sidebar-nav {
  margin-top: 16px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 16px;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--t-4);
  padding: 5px 12px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--t-2);
  font-size: 14.5px; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-item:hover { color: var(--t-1); background: rgba(255,255,255,0.03); }
.nav-item.active {
  color: #06070a;
  background: #ffffff;
  font-weight: 600;
}
.nav-item.active svg { color: #06070a; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; }

.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 10px 4px;
}
.nav-standalone { /* item solto após o divisor */ }
.nav-item .nav-chev {
  margin-left: auto;
  width: 13px; height: 13px;
  opacity: 0.5;
}

/* download card */
.dl-card {
  margin-top: 12px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 11px 11px 11px;
  display: flex; align-items: center; gap: 10px;
}
.dl-card .dl-ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--t-1);
}
.dl-card .dl-ic svg { width: 16px; height: 16px; }
.dl-card .dl-body { flex: 1; min-width: 0; }
.dl-card .dl-title { font-size: 12px; font-weight: 600; color: var(--t-1); margin-bottom: 1px; }
.dl-card .dl-sub { font-size: 11px; color: var(--t-4); line-height: 1.35; }

.support-pill {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 10px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #06140c;
  font-size: 12.5px; font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--r-md);
  box-shadow: 0 6px 18px -8px rgba(34, 197, 94, 0.45);
  cursor: pointer;
  transition: filter .15s;
}
.support-pill:hover { filter: brightness(1.05); }
.support-pill svg { width: 14px; height: 14px; }

/* user chip — pill com avatar quadrado + nome + chevron (dropdown) */
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-left: 4px;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.user-chip:hover { border-color: var(--line-hi); }
.user-chip .su-av {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--b-400);
  color: #fff;
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 26px;
  letter-spacing: 0;
}
.user-chip .su-name {
  font-size: 13px; font-weight: 600;
  color: var(--t-1);
  white-space: nowrap;
}
.user-chip .su-chev {
  width: 13px; height: 13px;
  color: var(--t-3);
  margin-left: -3px;
}

/* botão de Sair separado, icon-only */
.logout-btn {
  margin-left: 4px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--t-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.logout-btn:hover {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--t-1);
}
.logout-btn svg { width: 15px; height: 15px; }

/* ──────────── MAIN ──────────── */
.main { min-width: 0; }

/* topbar */
.topbar {
  display: flex; align-items: center;
  gap: 14px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0;
  z-index: 100;
}
/* meta de faturamento pill — progresso até a próxima milestone */
.goal-pill {
  display: inline-flex; flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px 9px;
  min-width: 280px;
  transition: border-color .15s;
}
.goal-pill:hover { border-color: var(--line-hi); }
.goal-head {
  display: flex; align-items: center; gap: 7px;
}
.goal-ic {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--b-300);
  flex: 0 0 16px;
}
.goal-ic svg { width: 14px; height: 14px; }
.goal-label {
  color: var(--b-300);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: -0.005em;
}
.goal-info {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--t-4);
  cursor: help;
  flex: 0 0 13px;
}
.goal-info svg { width: 12px; height: 12px; }
.goal-info:hover { color: var(--t-2); }
.goal-value {
  margin-left: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; font-weight: 600;
  color: var(--t-1);
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
  white-space: nowrap;
}
.goal-bar {
  height: 4px;
  background: rgba(91, 151, 245, 0.10);
  border-radius: 999px;
  overflow: hidden;
}
.goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--b-500), var(--b-300));
  border-radius: inherit;
  box-shadow: 0 0 8px -1px var(--b-glow);
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}

/* ── search legado (mantém estilo caso reintroduza) ── */
.search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--t-3);
  font-size: 12.5px;
  transition: border-color .15s;
}
.search:hover { border-color: var(--line-hi); }
.search svg { width: 13px; height: 13px; flex: 0 0 13px; }
.search input {
  background: transparent; border: 0; outline: 0;
  color: var(--t-1);
  font: inherit; font-size: 12.5px;
  flex: 1;
}
.search input::placeholder { color: var(--t-4); }

.topbar-right {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--t-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--bg-pill); color: var(--t-1); }
.icon-btn svg { width: 14px; height: 14px; }

.account-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 11px 3px 3px;
  border-radius: 999px;
  margin-left: 4px;
}
.account-chip .ac-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #93bdf9 0%, #3b82f6 100%);
  color: #fff;
  font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.account-chip .ac-info { line-height: 1.15; }
.account-chip .ac-name { font-size: 11.5px; font-weight: 600; color: var(--t-1); }
.account-chip .ac-mail { font-size: 10.5px; color: var(--t-4); }

/* page content */
.content { padding: 18px 22px 30px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 14px;
}
.page-head h1 {
  margin: 0 0 2px;
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.015em;
}
.page-head .sub {
  margin: 0;
  color: var(--t-3);
  font-size: 12.5px;
}
.page-actions { display: flex; align-items: center; gap: 4px; }

/* period tabs */
.tabs {
  display: flex; align-items: center; gap: 2px;
}
.tabs button, .tabs a {
  background: transparent;
  border: 0;
  color: var(--t-3);
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.tabs button:hover, .tabs a:hover { color: var(--t-1); background: rgba(255,255,255,0.03); }
.tabs button.is-active, .tabs a.is-active {
  background: #ffffff;
  color: #0c1622;
  font-weight: 600;
}
.tabs .tab-cal {
  margin-left: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--t-3);
}
.tabs .tab-cal:hover { background: var(--bg-pill); color: var(--t-1); }
.tabs .tab-cal svg { width: 15px; height: 15px; }

/* ════════════════════════════════════════════════════════════════
   KPI CARDS (gradient sólido)
   ════════════════════════════════════════════════════════════════ */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  position: relative;
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--t-1);
  transition: border-color .15s;
}
.kpi:hover { border-color: var(--line-hi); }

/* só um toque de cor: o ícone. fundo do card segue a estética escura do site */
.kpi-red     .kpi-ic { background: rgba(248,113,113,0.13); color: #f87171; }
.kpi-green-1 .kpi-ic { background: rgba(52,211,153,0.13);  color: #34d399; }
.kpi-green-2 .kpi-ic { background: rgba(91,151,245,0.13);  color: var(--b-300); }
.kpi-orange  .kpi-ic { background: rgba(251,191,36,0.13);  color: #fbbf24; }

.kpi-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.kpi-head .kpi-title {
  font-size: 12.5px; font-weight: 600;
  color: var(--t-3);
  letter-spacing: -0.005em;
}
.kpi-head .kpi-ic {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--bg-pill);
  display: flex; align-items: center; justify-content: center;
  color: var(--t-3);
  flex: none;
}
.kpi-head .kpi-ic svg { width: 16px; height: 16px; }

.kpi-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t-1);
  margin-bottom: 7px;
  font-feature-settings: 'tnum';
}
.kpi-value .currency {
  font-size: 14px; font-weight: 600;
  margin-right: 2px;
  color: var(--t-3);
}
.kpi-foot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--t-4);
}
.kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 700;
  color: var(--up);
}
.kpi-delta svg { width: 12px; height: 12px; }
.kpi-foot .sep { color: var(--t-4); }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD ROWS
   ════════════════════════════════════════════════════════════════ */
.dash-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
  margin-bottom: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: flex-start;
  padding: 14px 16px 0;
}
.card-head .ch-ic {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(91, 151, 245, 0.12);
  color: var(--b-300);
  display: flex; align-items: center; justify-content: center;
  margin-right: 10px;
}
.card-head .ch-ic svg { width: 15px; height: 15px; }
.card-head .ch-text { flex: 1; }
.card-head .ch-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--t-1);
  letter-spacing: -0.01em;
}
.card-head .ch-sub {
  font-size: 11.5px;
  color: var(--t-3);
  margin-top: 1px;
}
.card-head .ch-actions {
  display: flex; align-items: center; gap: 4px;
}

.card-body { padding: 12px 16px 16px; }

/* Big chart card */
.chart-summary {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 16px 0;
}
.chart-summary .cs-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t-1);
  font-feature-settings: 'tnum';
}
.chart-summary .cs-delta {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.18);
  color: var(--up);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.chart-summary .cs-delta.down {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.20);
  color: var(--down);
}
.chart-summary .cs-delta svg { width: 10px; height: 10px; }

.chart-wrap {
  position: relative;
  height: 200px;
  padding: 6px 12px 0;
}
.chart-wrap svg { display: block; width: 100%; height: 100%; }
.chart-grid line { stroke: rgba(255,255,255,0.035); stroke-dasharray: 2 4; }
.chart-line {
  fill: none;
  stroke: var(--b-400);
  stroke-width: 1.8;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
}
.chart-area { fill: url(#chartGrad); }
.chart-x text, .chart-y text {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; fill: var(--t-4);
  letter-spacing: 0.02em;
}
.chart-marker {
  stroke: var(--t-4);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.5;
}
.chart-tooltip {
  position: absolute;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 9px;
  pointer-events: none;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.8);
}
.chart-tooltip .tt-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; font-weight: 700;
  color: var(--b-300);
}
.chart-tooltip .tt-date {
  font-size: 10px;
  color: var(--t-3);
  margin-top: 1px;
}

/* Right side panel */
.side-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.side-panel.locked {
  position: relative;
  overflow: hidden;
}
.side-panel.locked .sp-body { opacity: 0.30; pointer-events: none; }
.side-panel .sp-head {
  display: flex; align-items: center;
  margin-bottom: 10px;
}
.side-panel .sp-head .ch-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  display: flex; align-items: center; justify-content: center;
  margin-right: 9px;
}
.side-panel .sp-head .ch-ic svg { width: 14px; height: 14px; }
.side-panel .sp-title { font-size: 13px; font-weight: 700; color: var(--t-1); letter-spacing: -0.005em; }
.side-panel .sp-sub { font-size: 11px; color: var(--t-3); margin-top: 1px; }

.achievement {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0;
}
.achievement-bar {
  flex: 1;
  height: 4px; border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  overflow: hidden;
}
.achievement-bar > i {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ade80, #16a34a);
}
.achievement-label {
  font-size: 10.5px;
  color: var(--t-4);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-width: 58px;
}

.sp-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgba(11, 12, 17, 0.20) 0%, rgba(11, 12, 17, 0.78) 100%);
  backdrop-filter: blur(2px);
}
.sp-overlay .lock-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-hi);
  color: var(--t-2);
  display: flex; align-items: center; justify-content: center;
}
.sp-overlay .lock-ic svg { width: 18px; height: 18px; }
.sp-overlay .lock-title {
  font-size: 14px; font-weight: 700;
  color: var(--t-1);
  letter-spacing: -0.005em;
}
.sp-overlay .lock-sub {
  font-size: 11px; color: var(--t-3);
}

/* ════════════════════════════════════════════════════════════════
   BOTTOM ROW (3 small cards)
   ════════════════════════════════════════════════════════════════ */
.bottom-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}
.bottom-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.bottom-card .bc-head {
  display: flex; align-items: center;
  padding: 13px 14px 9px;
}
.bottom-card .bc-title {
  font-size: 13px; font-weight: 700;
  color: var(--t-1);
  letter-spacing: -0.005em;
  flex: 1;
}
.bottom-card .bc-link {
  font-size: 11.5px; color: var(--t-3);
  display: inline-flex; align-items: center; gap: 3px;
}
.bottom-card .bc-link:hover { color: var(--b-300); }
.bottom-card .bc-link svg { width: 10px; height: 10px; }

.coming-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.18);
  color: #4ade80;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.coming-pill svg { width: 9px; height: 9px; }

.bc-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 14px 22px;
  gap: 5px;
  color: var(--t-4);
}
.bc-empty .ic {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.bc-empty .ic svg { width: 15px; height: 15px; }
.bc-empty .t { font-size: 11.5px; color: var(--t-3); font-weight: 500; }

/* events table inside bottom-card */
.evt-list { padding: 0 2px 4px; }
.evt-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
}
.evt-row + .evt-row { border-top: 1px solid var(--line); }
.evt-row .evt-time {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--t-4);
}
.evt-row .evt-name { font-size: 12px; color: var(--t-1); font-weight: 500; }
.evt-row .evt-name .sub {
  display: block;
  font-size: 10.5px; color: var(--t-4); font-weight: 400;
  margin-top: 1px;
}
.evt-row .evt-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; color: var(--t-1);
  font-feature-settings: 'tnum';
  text-align: right;
}
.evt-row .evt-value.muted { color: var(--t-4); }
.evt-badge {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.evt-badge.purchase   { background: var(--up); }
.evt-badge.checkout   { background: var(--b-400); }
.evt-badge.viewcontent{ background: var(--p-meta); }
.evt-badge.lead       { background: var(--warn); }

/* taxa de match · ring */
.ring-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 0 14px;
}
.ring {
  width: 104px; height: 104px;
  position: relative;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring svg circle { fill: none; stroke-width: 8; }
.ring .bg-circle { stroke: rgba(255,255,255,0.05); }
.ring .fg-circle { stroke: url(#ringGrad); stroke-linecap: round; }
.ring .center {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.ring .center .v {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 19px; font-weight: 700;
  color: var(--t-1);
  letter-spacing: -0.02em;
}
.ring .center .l {
  font-size: 10px; color: var(--t-3);
}
.ring-foot {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding-bottom: 12px;
  font-size: 10.5px; color: var(--t-3);
}
.ring-foot .delta { color: var(--up); font-weight: 700; font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVO
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .dash-row { grid-template-columns: 1fr; }
  .side-panel { min-height: 220px; }
}
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .bottom-row { grid-template-columns: 1fr 1fr; }
  .bottom-row .bottom-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content { padding: 18px; }
  .topbar { padding: 12px 18px; }
  .search { max-width: none; }
  .kpis { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════
   CONEXÕES (página /conexoes)
   ──────────────────────────────────────────────────────────────────── */
.page-title-inline { font-size: 15px; font-weight: 700; color: var(--t-1); }

/* botões adicionais */
.btn-secondary {
  background: var(--bg-pill);
  color: var(--t-1);
  border-color: var(--line-hi);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost-danger {
  background: transparent;
  color: var(--down);
  border: 1px solid var(--line-hi);
  padding: 8px 14px; border-radius: var(--r-md);
  font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost-danger:hover { background: rgba(239,68,68,0.10); border-color: var(--down); }

/* banners de status */
.banner {
  border-radius: var(--r-md);
  padding: 11px 14px; margin-bottom: 16px;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line-hi);
}
.banner-ok  { background: rgba(34,197,94,0.10);  color: #86efac; border-color: rgba(34,197,94,0.30); }
.banner-err { background: rgba(239,68,68,0.10);  color: #fca5a5; border-color: rgba(239,68,68,0.30); }

/* grid de contas conectadas */
.conn-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.conn-card { padding: 16px 18px; }
.conn-top { display: flex; align-items: center; gap: 13px; }
.conn-ic {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--bg-pill); color: var(--b-400);
  border: 1px solid var(--line);
}
.conn-ic svg { width: 20px; height: 20px; }
.conn-info { flex: 1; min-width: 0; }
.conn-name { font-weight: 700; color: var(--t-1); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.conn-meta { font-size: 12px; color: var(--t-4); margin-top: 3px; font-family: "JetBrains Mono", monospace; }
.conn-status {
  font-size: 11px; font-weight: 600; text-transform: capitalize;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(34,197,94,0.12); color: #86efac;
}
.conn-status--active { background: rgba(34,197,94,0.12); color: #86efac; }
.conn-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* pill sandbox */
.pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.pill-sandbox { background: rgba(245,158,11,0.15); color: var(--warn); border: 1px solid rgba(245,158,11,0.30); }

/* empty state */
.empty-conn { padding: 40px 24px; text-align: center; margin-bottom: 20px; }
.empty-ic { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-pill); color: var(--t-4); }
.empty-ic svg { width: 26px; height: 26px; }
.empty-title { font-weight: 700; color: var(--t-2); font-size: 15px; }
.empty-sub { color: var(--t-4); font-size: 13px; margin-top: 4px; }

/* linha de ações de conexão */
.connect-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.connect-note { font-size: 12px; color: var(--t-4); }

/* ════════════════════════════════════════════════════════════════════
   CAMPANHAS (página /campanhas)
   ──────────────────────────────────────────────────────────────────── */
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.link { color: var(--b-400); text-decoration: none; }
.link:hover { text-decoration: underline; }

.acc-block { margin-bottom: 24px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.acc-title { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--t-1); font-size: 14.5px; }
.acc-count { font-weight: 500; font-size: 12px; color: var(--t-4); }

.camp-card { padding: 0; overflow: hidden; }
.camp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.camp-table thead th {
  text-align: left; padding: 11px 16px;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--t-4); border-bottom: 1px solid var(--line);
}
.camp-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--t-2); }
.camp-table tbody tr:last-child td { border-bottom: none; }
.camp-table tbody tr:hover { background: var(--bg-hover); }
.ta-r { text-align: right; }
.camp-name { font-weight: 600; color: var(--t-1); }
.camp-id { display: block; font-size: 11px; color: var(--t-4); font-family: "JetBrains Mono", monospace; margin-top: 2px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.status-dot.on  { background: var(--up); box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
.status-dot.off { background: var(--t-4); }
.banner-info { background: rgba(91,151,245,0.10); color: var(--b-300); border-color: rgba(91,151,245,0.30); }

/* ════════════════════════════════════════════════════════════════════
   NOVA CAMPANHA (formulário)
   ──────────────────────────────────────────────────────────────────── */
.form-card { padding: 22px 24px; max-width: 560px; }
.field select {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  color: var(--t-1);
  font: inherit; font-size: 14px;
  outline: none; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field select:hover { border-color: var(--line-hi); }
.field select:focus {
  border-color: var(--b-400); background: var(--bg-1);
  box-shadow: 0 0 0 3px rgba(91,151,245,0.14);
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-actions .btn-secondary { text-decoration: none; }
.form-note { color: var(--t-4); font-size: 12.5px; margin-top: 14px; max-width: 560px; }

/* ════════════════════════════════════════════════════════════════════
   CONJUNTOS / DETALHE DA CAMPANHA
   ──────────────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--t-4); margin-bottom: 12px; }
.breadcrumb span { color: var(--t-4); }
.section-h { font-size: 14px; font-weight: 700; color: var(--t-2); margin: 22px 0 12px; }
.muted-sm { font-size: 11.5px; color: var(--t-4); }
.opt { font-weight: 400; color: var(--t-4); font-size: 11px; }

.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--r-md);
  background: var(--bg-input); border: 1px solid var(--line);
  font-size: 13px; color: var(--t-2); cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.check:hover { border-color: var(--line-hi); }
.check input { accent-color: var(--b-400); width: 15px; height: 15px; cursor: pointer; }
.check:has(input:checked) { border-color: var(--b-400); background: rgba(91,151,245,0.08); color: var(--t-1); }

/* input de arquivo (upload de vídeo) */
.field input[type="file"] {
  background: var(--bg-input); border: 1px dashed var(--line-hi);
  border-radius: var(--r-md); padding: 14px 12px; color: var(--t-3);
  font: inherit; font-size: 13px; cursor: pointer;
}
.field input[type="file"]:hover { border-color: var(--b-400); }
.field input[type="file"]::file-selector-button {
  background: var(--bg-pill); color: var(--t-1); border: 1px solid var(--line-hi);
  border-radius: var(--r-sm); padding: 6px 12px; margin-right: 12px;
  cursor: pointer; font: inherit; font-size: 12.5px;
}
.field select:disabled { opacity: .55; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════════
   WIZARD (etapas: Campanha · Conjunto · Anúncio)
   ──────────────────────────────────────────────────────────────────── */
.wizard-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.wstep {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--t-4);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card);
  white-space: nowrap;
}
.wstep .wnum {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11.5px;
  background: var(--bg-pill); color: var(--t-3); border: 1px solid var(--line-hi);
}
.wstep.active { color: var(--t-1); border-color: var(--b-400); background: rgba(91,151,245,0.08); }
.wstep.active .wnum { background: var(--b-400); color: #fff; border-color: var(--b-400); }
.wstep.done { color: var(--up); border-color: rgba(34,197,94,0.3); }
.wstep.done .wnum { background: var(--up); color: #06270f; border-color: var(--up); }
.wline { flex: 1; max-width: 48px; height: 2px; background: var(--line-hi); border-radius: 2px; }
.wline.on { background: var(--up); }

/* vídeo enviado (preview na criação de anúncio) */
.video-uploaded { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); border-radius: var(--r-md); margin-bottom: 8px; }
.video-thumb { width: 64px; height: 84px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-hi); background: var(--bg-pill); }
.video-meta { min-width: 0; }
.video-ok { display: inline-flex; align-items: center; gap: 6px; color: #86efac; font-weight: 700; font-size: 13.5px; }
.video-name { color: var(--t-2); font-size: 13px; margin-top: 3px; }
.video-id { color: var(--t-4); font-size: 11px; font-family: "JetBrains Mono", monospace; margin-top: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════════
   WIZARD MODERNO — Nova Campanha (largo, minimalista)
   ──────────────────────────────────────────────────────────────────── */
.wizard-content { max-width: 880px; margin: 0 auto; }

/* indicador de etapas (clicável) */
.wz-steps { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; }
.wz-step {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--t-4);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-card);
  transition: border-color .15s, color .15s, background .15s;
}
.wz-step:hover { border-color: var(--line-hi); color: var(--t-2); }
.wz-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: var(--bg-pill); color: var(--t-3); border: 1px solid var(--line-hi); transition: all .15s; }
.wz-step.active { color: var(--t-1); border-color: var(--b-400); background: rgba(91,151,245,0.08); }
.wz-step.active .wz-num { background: var(--b-400); color: #fff; border-color: var(--b-400); }
.wz-step.done { color: var(--up); border-color: rgba(34,197,94,0.3); }
.wz-step.done .wz-num { background: var(--up); color: #06270f; border-color: var(--up); }
.wz-line { flex: 1; height: 2px; background: var(--line-hi); border-radius: 2px; }

/* cards do wizard */
.wz-card { padding: 20px 22px; margin-bottom: 14px; }
.wz-card-h { font-size: 13px; font-weight: 700; color: var(--t-1); margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); letter-spacing: .01em; }
.wz-sub { margin: 4px 0 12px; padding-left: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* navegação do wizard */
.wz-nav { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; gap: 12px; }

/* toggle switch */
.toggle { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; padding: 7px 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { width: 38px; height: 22px; border-radius: 999px; background: var(--bg-pill);
  border: 1px solid var(--line-hi); position: relative; flex: none; transition: background .18s, border-color .18s; }
.toggle-dot { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--t-3); transition: transform .18s, background .18s; }
.toggle input:checked + .toggle-track { background: var(--b-400); border-color: var(--b-400); }
.toggle input:checked + .toggle-track .toggle-dot { transform: translateX(16px); background: #fff; }
.toggle-label { font-size: 13.5px; color: var(--t-2); }
.toggle-row { display: flex; flex-direction: column; gap: 2px; }

/* segmented control */
.segmented { display: inline-flex; background: var(--bg-input); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-block; padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--t-3); cursor: pointer; transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--b-400); color: #fff; }
.seg:hover span { color: var(--t-1); }

@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } .wz-steps { font-size: 12px; } }

/* ════════════════════════════════════════════════════════════════════
   GRÁFICO Gasto × Faturamento (dashboard)
   ──────────────────────────────────────────────────────────────────── */
.chart-line-rev { fill: none; stroke: var(--up); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6)); }
.chart-area-rev { fill: url(#revGrad); }
.chart-line-spend { fill: none; stroke: var(--down); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 5 4; opacity: .9; }

.chart-legend { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t-3); font-weight: 500; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; }
.lg-rev { background: var(--up); }
.lg-spend { background: var(--down); }

.cs-block { display: flex; flex-direction: column; }
.cs-label { font-size: 11px; color: var(--t-4); font-weight: 500; margin-bottom: 1px; }

/* ════════════════════════════════════════════════════════════════════
   TOP CAMPANHAS (ranking no side-panel do dashboard)
   ──────────────────────────────────────────────────────────────────── */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-pos { width: 22px; height: 22px; flex: none; border-radius: 6px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--t-3); background: var(--bg-pill); border: 1px solid var(--line); }
.rank-row:first-child .rank-pos { background: rgba(245,158,11,0.16); color: var(--warn); border-color: rgba(245,158,11,0.3); }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; font-weight: 600; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { height: 5px; border-radius: 3px; background: var(--bg-pill); margin-top: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--b-500), var(--b-300)); }
.rank-vals { text-align: right; flex: none; }
.rank-rev { font-size: 12.5px; font-weight: 700; color: var(--t-1); font-family: "JetBrains Mono", monospace; }
.rank-roi { font-size: 11px; color: var(--up); font-weight: 600; }
.rank-empty { color: var(--t-4); font-size: 13px; padding: 18px 2px; text-align: center; }

/* ════════════════════════════════════════════════════════════════════
   TABELA DE CAMPANHAS (clean, ordenável, expansível)
   ──────────────────────────────────────────────────────────────────── */
.ctbl-card { padding: 0; overflow: hidden; }
.ctbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ctbl thead th {
  text-align: left; padding: 13px 18px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--t-3);
  border-bottom: 1px solid var(--line); user-select: none;
}
.ctbl thead th.sortable { cursor: pointer; transition: color .12s; }
.ctbl thead th.sortable:hover { color: var(--t-1); }
.ctbl .ta-r { text-align: right; }
.sort-ar { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: .35; }
.ctbl th .sort-ar { border-top: 5px solid var(--t-4); }
.ctbl th.asc .sort-ar { border-top: none; border-bottom: 5px solid var(--up); opacity: 1; }
.ctbl th.desc .sort-ar { border-top: 5px solid var(--up); border-bottom: none; opacity: 1; }

.ctbl tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--t-2); vertical-align: middle; }
.ctbl tbody tr.ctbl-row:hover { background: var(--bg-hover); }
.ctbl tbody tr.ctbl-row:last-of-type td { }
.ctbl .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: 'tnum'; color: var(--t-1); white-space: nowrap; }
.ctbl-name { vertical-align: middle; }
.ctbl-name-inner { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ctbl-chev { background: none; border: none; padding: 0; cursor: pointer; color: var(--t-4);
  width: 18px; height: 18px; display: grid; place-items: center; flex: none; transition: transform .15s, color .15s; }
.ctbl-chev svg { width: 14px; height: 14px; }
.ctbl-chev.open { transform: rotate(90deg); color: var(--b-400); }
.ctbl-link { color: var(--t-1); text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctbl-link:hover { color: var(--b-400); }

/* sub-linha (conjuntos) */
.ctbl-sub td { background: var(--bg-1); padding: 0; }
.sub-wrap { padding: 14px 18px 16px 46px; }
.sub-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--t-4); margin-bottom: 8px; font-weight: 600; }
.sub-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t-2); padding: 5px 0; }
.sub-empty { font-size: 13px; color: var(--t-4); }
.sub-link { display: inline-block; margin-top: 10px; font-size: 12.5px; }

/* estado vazio do gráfico (sem dados reais ainda) */
.chart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 200px; gap: 4px; }
.chart-empty-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-pill); color: var(--t-4); margin-bottom: 6px; }
.chart-empty-ic svg { width: 22px; height: 22px; }
.chart-empty-t { font-weight: 600; color: var(--t-2); font-size: 14px; }
.chart-empty-s { font-size: 12.5px; color: var(--t-4); max-width: 320px; }

/* ════════════════════════════════════════════════════════════════════
   CONEXÕES — Business Centers (expansível + paginação)
   ──────────────────────────────────────────────────────────────────── */
.bc-list { display: flex; flex-direction: column; gap: 12px; }
.bc-item { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s; }
.bc-item:hover { border-color: var(--line-hi); }

.bc-bar { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: none; border: none; cursor: pointer; text-align: left; }
.bc-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: rgba(34,197,94,0.10); color: var(--up); border: 1px solid rgba(34,197,94,0.20); }
.bc-ic svg { width: 21px; height: 21px; }
.bc-meta { flex: 1; min-width: 0; }
.bc-name { display: block; font-weight: 700; color: var(--t-1); font-size: 15px; }
.bc-count { display: block; font-size: 12.5px; color: var(--t-4); margin-top: 2px; }
.bc-badges { display: flex; gap: 7px; }
.cbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cbadge-active { background: rgba(34,197,94,0.12); color: #86efac; }
.cbadge-suspended { background: rgba(245,158,11,0.14); color: var(--warn); }
.cbadge-pending { background: rgba(91,151,245,0.12); color: var(--b-300); }
.bc-chev { width: 18px; height: 18px; color: var(--t-4); transition: transform .18s; flex: none; }
.bc-bar.open .bc-chev { transform: rotate(180deg); }

.bc-body { border-top: 1px solid var(--line); background: var(--bg-1); }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 22px; border-bottom: 1px solid var(--line); }
.acc-row:last-child { border-bottom: none; }
.acc-info { flex: 1; min-width: 0; }
.acc-name { font-size: 13.5px; font-weight: 600; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-id { font-size: 11.5px; color: var(--t-4); font-family: "JetBrains Mono", monospace; margin-top: 2px; }
.acc-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.acc-badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.acc-badge--active { background: rgba(34,197,94,0.10); color: #86efac; } .acc-badge--active .dot { background: var(--up); }
.acc-badge--suspended { background: rgba(245,158,11,0.12); color: var(--warn); } .acc-badge--suspended .dot { background: var(--warn); }
.acc-badge--pending { background: rgba(148,163,184,0.12); color: var(--t-3); } .acc-badge--pending .dot { background: var(--t-3); }
.acc-ver { font-size: 12.5px; font-weight: 600; color: var(--t-2); text-decoration: none; padding: 6px 14px; border: 1px solid var(--line-hi); border-radius: var(--r-sm); transition: background .15s, border-color .15s; }
.acc-ver:hover { background: var(--bg-hover); border-color: var(--b-400); color: var(--t-1); }

.acc-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.pager-info { font-size: 12.5px; color: var(--t-4); }
.pager-btns { display: flex; align-items: center; gap: 10px; }
.pager-pages { font-size: 12.5px; color: var(--t-3); font-family: "JetBrains Mono", monospace; }
.pager-prev, .pager-next { width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line-hi); background: var(--bg-card); color: var(--t-2); cursor: pointer; font-size: 16px; line-height: 1; transition: background .15s; }
.pager-prev:hover, .pager-next:hover { background: var(--bg-hover); }

/* ════════════════════════════════════════════════════════════════════
   Filtro de BM no dashboard (minimalista)
   ──────────────────────────────────────────────────────────────────── */
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

/* dropdown de BM — premium */
.bm-dd { position: relative; }
.bm-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-2));
  border: 1px solid var(--line-hi); border-radius: 12px;
  color: var(--t-1); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; min-width: 200px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 6px 18px -12px rgba(0,0,0,0.8);
  transition: border-color .15s, background .15s;
}
.bm-trigger:hover { border-color: var(--b-400); }
.bm-trigger-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 7px; background: rgba(91,151,245,0.12); color: var(--b-300); }
.bm-trigger-ic svg { width: 15px; height: 15px; }
.bm-current { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-arrow { width: 15px; height: 15px; color: var(--t-4); flex: none; transition: transform .2s; }
.bm-dd.open .bm-arrow { transform: rotate(180deg); }

.bm-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 260px; max-width: 340px; max-height: 360px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line-hi);
  border-radius: 14px; padding: 7px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.bm-dd.open .bm-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.bm-menu-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--t-4); font-weight: 700; padding: 7px 10px 6px; }
.bm-opt { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  color: var(--t-2); cursor: pointer; transition: background .12s; }
.bm-opt:hover { background: var(--bg-hover); color: var(--t-1); }
.bm-opt-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: var(--bg-pill); color: var(--t-3); border: 1px solid var(--line); }
.bm-opt-ic svg { width: 16px; height: 16px; }
.bm-opt-name { flex: 1; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-check { width: 16px; height: 16px; color: var(--b-400); flex: none; }
.bm-opt.is-sel { background: rgba(91,151,245,0.08); color: var(--t-1); }
.bm-opt.is-sel .bm-opt-ic { background: rgba(91,151,245,0.14); color: var(--b-300); border-color: rgba(91,151,245,0.3); }

/* toolbar de Campanhas — alinhar filtro BM + Sincronizar + Nova Campanha */
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-btn { height: 40px; border-radius: 12px; }

/* sparkline de faturamento na topbar */
.goal-spark { display: inline-flex; align-items: center; width: 70px; height: 22px; margin-left: 4px; }
.goal-spark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(34,197,94,0.25)); }

/* spinner de carregamento (estado aquecendo) */
.loading-spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════════
   WIZARD em lote — multi-select de BC + lista de contas
   ──────────────────────────────────────────────────────────────────── */
.msel { position: relative; }
.msel-trigger { width: 100%; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md);
  color: var(--t-1); font: inherit; font-size: 14px; cursor: pointer; }
.msel-trigger:hover { border-color: var(--b-400); }
.msel-summary { flex: 1; text-align: left; color: var(--t-2); }
.msel-arrow { width: 16px; height: 16px; color: var(--t-4); transition: transform .2s; }
.msel.open .msel-arrow { transform: rotate(180deg); }
.msel-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  background: var(--bg-2); border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: 8px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.7); max-height: 320px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .15s, transform .15s; }
.msel.open .msel-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.msel-search { width: 100%; background: var(--bg-input); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; color: var(--t-1); font: inherit; font-size: 13px; outline: none; margin-bottom: 6px; }
.msel-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--t-2); font-size: 13.5px; }
.msel-opt:hover { background: var(--bg-hover); color: var(--t-1); }
.msel-opt input { accent-color: var(--b-400); width: 16px; height: 16px; }
.msel-empty, .acc-empty, .acc-empty-sm { color: var(--t-4); font-size: 13px; padding: 16px; text-align: center; }
.acc-empty-sm { padding: 10px; }

.bc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.bc-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  background: rgba(91,151,245,0.1); color: var(--b-300); border: 1px solid rgba(91,151,245,0.3);
  padding: 5px 11px; border-radius: 999px; }
.bc-chip b { cursor: pointer; color: var(--t-3); font-weight: 700; }
.bc-chip b:hover { color: var(--down); }

.acc-pick-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.acc-count-lbl { font-size: 13px; color: var(--t-3); font-weight: 600; }
.acc-pick-actions { display: flex; gap: 8px; }
.mini-btn { background: var(--bg-pill); border: 1px solid var(--line-hi); color: var(--t-2);
  font: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: var(--r-sm); cursor: pointer; }
.mini-btn:hover { background: var(--bg-hover); color: var(--t-1); }
.acc-pick-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-1); }
.acc-group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--t-4);
  font-weight: 700; padding: 10px 14px 6px; background: var(--bg-2); position: sticky; top: 0; }
.acc-line { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.acc-line:hover { background: var(--bg-hover); }
.acc-line input { accent-color: var(--b-400); width: 16px; height: 16px; flex: none; }
.acc-line-main { flex: 1; min-width: 0; }
.acc-line-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--t-1); }
.acc-line-id { display: block; font-size: 11px; color: var(--t-4); font-family: "JetBrains Mono", monospace; }
.acc-line-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* deixa o dropdown de BC "vazar" do card (senão é cortado pelo overflow:hidden) */
.wz-card-overflow { overflow: visible; position: relative; z-index: 20; }

/* tipo de orçamento + replicação (wizard) */
.seg-3 { flex-wrap: wrap; }
.warn-hint { color: var(--warn); }
.repl-card { border: 1px solid rgba(139,92,246,0.25); background: linear-gradient(180deg, rgba(139,92,246,0.05), transparent); }
.repl-note { font-size: 12.5px; color: var(--t-3); align-self: center; line-height: 1.5; }

/* ── Anúncio: UTM, identidade, summary ── */
.utm-box { border: 1px solid rgba(34,197,94,0.25); background: rgba(34,197,94,0.04); border-radius: var(--r-md); padding: 12px 14px; margin: 4px 0 14px; }
.utm-head { padding: 0 0 8px; }
.utm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.utm-chip { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t-3); background: var(--bg-input); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; }
.utm-chip input { accent-color: var(--up); }
.utm-chip b { color: var(--b-300); font-family: "JetBrains Mono", monospace; font-weight: 600; }
.req-tag { font-size: 10.5px; font-weight: 700; color: var(--down); background: rgba(239,68,68,0.12); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }

.ident-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ident-card { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line-hi); border-radius: var(--r-md); cursor: pointer; background: var(--bg-input); transition: border-color .15s, background .15s; }
.ident-card:hover { border-color: var(--b-400); }
.ident-card:has(input:checked) { border-color: var(--b-400); background: rgba(91,151,245,0.08); }
.ident-card input { accent-color: var(--b-400); flex: none; width: 16px; height: 16px; margin: 0; }
.ident-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.ident-img-ph { display: grid; place-items: center; background: var(--bg-pill); color: var(--t-2); font-weight: 700; }
.ident-meta { flex: 1; min-width: 0; }
.ident-name { display: block; font-size: 13px; font-weight: 600; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ident-handle { font-size: 11px; color: var(--t-4); }
.ident-tag { font-size: 9.5px; font-weight: 700; color: var(--b-300); background: rgba(91,151,245,0.12); padding: 2px 7px; border-radius: 999px; }
.create-summary { background: var(--bg-pill); border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: 12px 16px; font-size: 13.5px; color: var(--t-2); margin: 8px 0 14px; }
.create-summary b { color: var(--b-300); }
@media (max-width:720px){ .ident-list, .utm-grid { grid-template-columns: 1fr; } }

/* overlay de carregamento ao criar campanhas (upload/processamento) */
.wz-loading { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
  background: rgba(8,9,14,0.82); backdrop-filter: blur(4px); }
.wz-loading.show { display: flex; }
.wz-loading-box { text-align: center; max-width: 420px; padding: 32px 28px; }
.wz-spinner { width: 46px; height: 46px; margin: 0 auto 20px; border-radius: 50%;
  border: 3px solid rgba(91,151,245,0.2); border-top-color: var(--b-400); animation: spin 0.8s linear infinite; }
.wz-loading-title { font-size: 17px; font-weight: 700; color: var(--t-1); margin-bottom: 8px; }
.wz-loading-sub { font-size: 13px; color: var(--t-3); line-height: 1.55; }

/* barra de progresso da criação em lote */
.wz-prog { text-align: left; width: 92%; max-width: 480px; padding: 26px 28px;
  background: var(--bg-card); border: 1px solid var(--line-hi); border-radius: var(--r-xl);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7); animation: wzPop .25s cubic-bezier(.2,.7,.3,1); }
@keyframes wzPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.wz-prog-top { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.wz-prog-pct { font-size: 42px; font-weight: 800; line-height: 1; color: var(--t-1);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; flex: none; }
.wz-prog-pct i { font-size: 19px; font-weight: 700; color: var(--b-400); font-style: normal; margin-left: 2px; }
.wz-prog-meta { min-width: 0; }
.wz-prog-title { font-size: 15px; font-weight: 700; color: var(--t-1); margin-bottom: 3px; }
.wz-prog-current { font-size: 12.5px; color: var(--t-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-prog-track { height: 12px; border-radius: 999px; background: var(--bg-input);
  border: 1px solid var(--line); overflow: hidden; position: relative; }
.wz-prog-fill { height: 100%; width: 0; border-radius: 999px; position: relative;
  background: linear-gradient(90deg, var(--b-500), var(--b-300));
  box-shadow: 0 0 16px var(--b-glow); transition: width .45s cubic-bezier(.4,0,.2,1); }
.wz-prog-fill::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-100%); animation: wzShim 1.3s ease-in-out infinite; }
.wz-prog.done .wz-prog-fill { background: linear-gradient(90deg, var(--up), #4ade80); box-shadow: 0 0 16px rgba(34,197,94,0.4); }
.wz-prog.done .wz-prog-fill::after { display: none; }
@keyframes wzShim { to { transform: translateX(100%); } }
.wz-prog-stats { display: flex; gap: 10px; margin-top: 20px; }
.wz-stat { flex: 1; text-align: center; background: var(--bg-input); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 11px 8px; }
.wz-stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1;
  color: var(--t-1); font-variant-numeric: tabular-nums; }
.wz-stat span { font-size: 10.5px; color: var(--t-4); text-transform: uppercase; letter-spacing: 0.04em; }
.wz-stat.ok b { color: var(--b-300); }
.wz-prog.has-fail .wz-stat.fail b { color: var(--down); }
.wz-prog-foot { margin-top: 18px; font-size: 12px; color: var(--t-4); text-align: center; }
.wz-prog.done .wz-prog-foot { display: none; }
.wz-prog-actions { margin-top: 18px; text-align: center; display: none; }
.wz-prog-actions.show { display: block; }

/* anti-tremor: isola o reflow do chip ao marcar (idade/idioma) */
.check, .lang-chip, .seg { contain: layout paint; }

/* ações na linha de campanha (pausar/ativar/excluir) */
.ctbl-actions-h { width: 84px; }
.ctbl-actions { white-space: nowrap; }
.row-act { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-hi); background: var(--bg-pill); color: var(--t-2); border-radius: 8px;
  cursor: pointer; padding: 0; transition: all .15s; vertical-align: middle; }
.row-act + .row-act, .row-act ~ form .row-act { margin-left: 5px; }
.row-act svg { width: 14px; height: 14px; }
.row-act:hover { background: var(--bg-hover); color: var(--t-1); border-color: var(--b-400); }
.row-act-on:hover { color: var(--up); border-color: var(--up); }
.row-act-del:hover { color: var(--down); border-color: var(--down); background: rgba(239,68,68,0.08); }

/* ════════════════════════════════════════════════════════════════════
   ATIVADOR DE PIXEL
   ──────────────────────────────────────────────────────────────────── */
.pxl-info { display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 18px; align-items: flex-start; }
.pxl-info-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: rgba(91,151,245,0.12); color: var(--b-300); }
.pxl-info-ic svg { width: 20px; height: 20px; }
.pxl-info-t { font-size: 14px; font-weight: 700; color: var(--t-1); margin-bottom: 4px; }
.pxl-info p { font-size: 13px; color: var(--t-3); line-height: 1.6; }
.pxl-info code { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--b-300);
  background: rgba(91,151,245,0.1); padding: 1px 6px; border-radius: 5px; }

.pxl-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.pxl-panel { padding: 22px; }
.pxl-step-n { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--t-4); margin-bottom: 18px; }

/* orb com sonar */
.pxl-orb { position: relative; width: 130px; height: 130px; margin: 6px auto 14px; display: grid; place-items: center; }
.pxl-orb-core { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #1b2740, #0d1220);
  border: 1px solid var(--line-hi); color: var(--t-4); transition: all .4s; }
.pxl-orb-core svg { width: 32px; height: 32px; }
.pxl-orb-ring { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  border: 1.5px solid var(--b-400); opacity: 0; }
.pxl-orb.active .pxl-orb-core { color: var(--up); border-color: rgba(34,197,94,0.5);
  background: radial-gradient(circle at 35% 30%, #14331f, #0a1710); box-shadow: 0 0 28px -6px rgba(34,197,94,0.55); }
.pxl-orb.active .pxl-orb-ring { border-color: var(--up); animation: sonar 2.4s ease-out infinite; }
.pxl-orb.active .pxl-orb-ring:nth-child(2){ animation-delay: .8s; }
.pxl-orb.active .pxl-orb-ring:nth-child(3){ animation-delay: 1.6s; }
.pxl-orb.pumping .pxl-orb-ring { animation-duration: 1.1s; }
.pxl-orb.pumping .pxl-orb-core { transform: scale(1.06); }
@keyframes sonar { 0% { opacity:.7; transform: scale(1); } 100% { opacity:0; transform: scale(2.5); } }

.pxl-status { text-align: center; font-size: 12.5px; color: var(--t-4); margin-bottom: 20px; }
.pxl-status.on { color: var(--up); }
.pxl-status b { font-family: "JetBrains Mono", monospace; }
.pxl-or { text-align: center; font-size: 11px; color: var(--t-4); margin: 12px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.pxl-arm { width: 100%; justify-content: center; margin-top: 6px; }
#pxlCode { font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; text-transform: uppercase; }

.pxl-col { display: flex; flex-direction: column; gap: 18px; }

/* progresso + eventos */
.pxl-progress { height: 4px; border-radius: 3px; background: var(--bg-pill); overflow: hidden; margin-bottom: 16px; }
.pxl-progress span { display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--b-400), var(--up)); transition: width .35s ease; }
.pxl-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pxl-event { position: relative; text-align: left; padding: 13px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-hi); background: var(--bg-input); cursor: pointer; overflow: hidden;
  transition: border-color .15s, background .15s, transform .15s; display: flex; flex-direction: column; gap: 3px; }
.pxl-event:hover { border-color: var(--b-400); transform: translateY(-1px); }
.pxl-ev-name { font-size: 13px; font-weight: 600; color: var(--t-1); }
.pxl-ev-code { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--b-300); }
.pxl-ev-desc { font-size: 11px; color: var(--t-4); }
.pxl-ev-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--up); color: #06120a; opacity: 0; transform: scale(.4); transition: all .25s; }
.pxl-ev-check svg { width: 12px; height: 12px; }
.pxl-event.firing { border-color: var(--b-400); background: rgba(91,151,245,0.1); animation: evpulse .5s ease; }
.pxl-event.firing::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(91,151,245,0.25), transparent 70%); animation: evflash .5s ease; }
.pxl-event.done { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.07); }
.pxl-event.done .pxl-ev-check { opacity: 1; transform: scale(1); }
@keyframes evpulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px) scale(1.02); } }
@keyframes evflash { 0% { opacity: 1; } 100% { opacity: 0; } }
.pxl-fire-all { width: 100%; justify-content: center; }

/* card travado até carregar o pixel */
.pxl-locked { opacity: .45; pointer-events: none; filter: grayscale(.4); }

/* log terminal */
.pxl-logcard { padding: 0; overflow: hidden; }
.pxl-log-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px;
  border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--t-2); }
.pxl-log-count { font-size: 11px; color: var(--t-4); font-weight: 500; }
.pxl-log { font-family: "JetBrains Mono", monospace; font-size: 12px; padding: 12px 16px; max-height: 240px;
  overflow-y: auto; background: #07090e; }
.pxl-log-empty { color: var(--t-4); font-style: italic; }
.pxl-log-line { display: flex; align-items: center; gap: 9px; padding: 4px 0; animation: logIn .25s ease; }
.pxl-log-ts { color: var(--t-4); flex: none; }
.pxl-log-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--b-400); }
.pxl-log-line.ok .pxl-log-dot { background: var(--up); }
.pxl-log-line.err .pxl-log-dot { background: var(--down); }
.pxl-log-line.done .pxl-log-dot { background: var(--warn); }
.pxl-log-msg { color: var(--t-2); }
.pxl-log-line.err .pxl-log-msg { color: var(--down); }
.pxl-log-line.done .pxl-log-msg { color: var(--warn); font-weight: 600; }
@keyframes logIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }

.flash { animation: flashErr .6s ease; }
@keyframes flashErr { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px rgba(239,68,68,0.4); } }

@media (max-width: 900px){ .pxl-grid { grid-template-columns: 1fr; } }

/* ── sidebar recolhível (só ícones) ── */
.app { transition: grid-template-columns .18s ease; }
.nav-collapse-btn { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.app.nav-collapsed { grid-template-columns: 76px 1fr; }
.app.nav-collapsed .brand-name,
.app.nav-collapsed .nav-group-label,
.app.nav-collapsed .nav-collapse-label { display: none; }
.app.nav-collapsed .brand { justify-content: center; gap: 0; }
.app.nav-collapsed .brand-mark { width: 56px; height: 56px; margin: -6px auto; }
.app.nav-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
.app.nav-collapsed .nav-item {
  font-size: 0;            /* esconde o texto, mantém o ícone (tem tamanho fixo) */
  gap: 0; padding: 0;
  width: 38px; height: 38px; margin: 2px auto;
  justify-content: center; align-items: center;
  border-radius: 11px;     /* quadradinho arredondado em volta do ícone */
}
.app.nav-collapsed .nav-group { align-items: center; }
.app.nav-collapsed .nav-divider { margin-left: 6px; margin-right: 6px; }

/* dashboard: botão atualizar ao lado do filtro de BM */
.tabs-right { display: flex; align-items: center; gap: 10px; }

/* ════════════════════════════════════════════════════════════════════
   APELAÇÕES
   ──────────────────────────────────────────────────────────────────── */
.btn-ghost { background: transparent; border: 1px solid var(--line-hi); color: var(--t-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--t-1); }

/* KPIs */
.apl-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.apl-kpi { display: block; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--bg-card); text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.apl-kpi:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.apl-kpi.sel { border-color: var(--b-400); background: rgba(91,151,245,0.05); }
.apl-kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.apl-kpi-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.apl-kpi-ic svg { width: 18px; height: 18px; }
.apl-kpi-ic.warn { background: rgba(245,158,11,0.14); color: var(--warn); }
.apl-kpi-ic.blue { background: rgba(91,151,245,0.14); color: var(--b-300); }
.apl-kpi-ic.up   { background: rgba(34,197,94,0.14); color: var(--up); }
.apl-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--t-3); }
.apl-kpi-num { font-size: 34px; font-weight: 800; color: var(--t-1); line-height: 1; margin-bottom: 8px; letter-spacing: -.02em; }
.apl-kpi-sub { font-size: 12.5px; color: var(--t-4); }
.apl-rate { color: var(--up); font-weight: 600; }

/* lista */
.apl-listcard { padding: 0; overflow: hidden; }
.apl-list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.apl-list-title { font-size: 14px; font-weight: 700; color: var(--t-1); display: flex; align-items: center; gap: 9px; }
.apl-count { font-size: 11px; font-weight: 700; color: var(--t-3); background: var(--bg-pill); padding: 2px 9px; border-radius: 999px; }
.apl-list-actions { display: flex; gap: 8px; }
.apl-mini { height: 34px; padding: 0 14px; font-size: 12.5px; }

.apl-table { width: 100%; border-collapse: collapse; }
.apl-table thead th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--t-4); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.apl-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--t-2); vertical-align: middle; }
.apl-table tbody tr:hover { background: var(--bg-hover); }
.apl-ck { width: 38px; }
.apl-ck input { accent-color: var(--b-400); width: 15px; height: 15px; }
.apl-ent-name { display: block; font-weight: 600; color: var(--t-1); }
.apl-ent-id { display: block; font-size: 11px; color: var(--t-4); font-family: "JetBrains Mono", monospace; }
.apl-muted { color: var(--t-3); }
.apl-reason { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apl-type { font-size: 11.5px; font-weight: 600; color: var(--t-2); background: var(--bg-pill); padding: 3px 9px; border-radius: 6px; }
.apl-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.apl-badge.warn { background: rgba(245,158,11,0.14); color: var(--warn); }
.apl-badge.blue { background: rgba(91,151,245,0.14); color: var(--b-300); }
.apl-badge.up   { background: rgba(34,197,94,0.14); color: var(--up); }

.apl-empty { padding: 56px 24px; text-align: center; }
.apl-empty-ic { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(34,197,94,0.12); color: var(--up); }
.apl-empty-ic svg { width: 28px; height: 28px; }
.apl-empty-t { font-size: 16px; font-weight: 700; color: var(--t-1); margin-bottom: 6px; }
.apl-empty-s { font-size: 13px; color: var(--t-3); max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* drawer */
.apl-scrim { position: fixed; inset: 0; background: rgba(6,7,11,0.6); backdrop-filter: blur(2px); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .2s; }
.apl-scrim.show { opacity: 1; pointer-events: auto; }
.apl-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw; z-index: 201;
  background: var(--bg-elev); border-left: 1px solid var(--line-hi); transform: translateX(100%);
  transition: transform .25s ease; box-shadow: -30px 0 60px -20px rgba(0,0,0,0.6); }
.apl-drawer.open { transform: translateX(0); }
.apl-drawer-form { display: flex; flex-direction: column; height: 100%; }
.apl-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.apl-drawer-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--t-1); }
.apl-drawer-title svg { width: 18px; height: 18px; color: var(--b-400); }
.apl-x { background: var(--bg-pill); border: 1px solid var(--line-hi); color: var(--t-3); width: 30px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 14px; }
.apl-x:hover { color: var(--t-1); }
.apl-drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.apl-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.apl-sec:last-child { border-bottom: 0; }
.apl-sec-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--t-1); margin-bottom: 4px; }
.apl-sec-h svg { width: 15px; height: 15px; color: var(--b-300); }
.apl-sec-d { font-size: 12px; color: var(--t-3); line-height: 1.5; margin-bottom: 12px; }
.apl-template { width: 100%; background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md);
  padding: 12px 13px; color: var(--t-1); font: inherit; font-size: 12.5px; line-height: 1.55; resize: vertical; outline: none; }
.apl-template:focus { border-color: var(--b-400); }
.apl-batch { display: flex; align-items: center; gap: 10px; }
.apl-batch input { width: 120px; background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md);
  padding: 10px 13px; color: var(--t-1); font: inherit; text-align: center; outline: none; }
.apl-batch input:focus { border-color: var(--b-400); }
.apl-batch span { font-size: 12.5px; color: var(--t-3); }
.apl-drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); }

@media (max-width: 820px){ .apl-kpis { grid-template-columns: 1fr; } }

/* gráfico fantasma do dashboard (preview bonito sem dados) */
.chart-ghost { position: relative; min-height: 240px; padding: 16px 8px 0; display: flex; flex-direction: column; justify-content: flex-end; }
.ghost-grid { position: absolute; inset: 16px 8px 40px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ghost-grid span { height: 1px; background: var(--line); opacity: .5; }
.ghost-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 210px; position: relative; z-index: 1; }
.gb-col { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 100%;
  animation: ghostRise .7s cubic-bezier(.2,.7,.3,1) both; }
.gb { width: 10px; border-radius: 5px 5px 0 0; }
.gb-rev   { background: linear-gradient(180deg, rgba(34,197,94,0.55), rgba(34,197,94,0.05)); }
.gb-spend { background: linear-gradient(180deg, rgba(239,68,68,0.45), rgba(239,68,68,0.04)); }
@keyframes ghostRise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.gb-col { transform-origin: bottom; }
.chart-ghost-cap { text-align: center; font-size: 11px; color: var(--t-4); margin-top: 14px; letter-spacing: .02em; }

/* lucro: verde se positivo, vermelho se negativo, padrão se zero */
.kpi-value.val-up { color: var(--up); }
.kpi-value.val-up .currency { color: var(--up); }
.kpi-value.val-down { color: var(--down); }
.kpi-value.val-down .currency { color: var(--down); }

/* lucro no período (card do gráfico) — mesma lógica de cor */
.cs-value.val-up { color: var(--up); }
.cs-value.val-down { color: var(--down); }

/* ════════════════════════════════════════════════════════════════════
   CAMPANHAS — agrupadas por conta de anúncio (cards expansíveis)
   ──────────────────────────────────────────────────────────────────── */
.acct-list { display: flex; flex-direction: column; gap: 14px; }
.acct-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acct-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--t-1); font: inherit; }
.acct-head:hover { background: var(--bg-hover); }
.acct-chev { display: flex; color: var(--t-4); transition: transform .15s; flex: none; }
.acct-chev svg { width: 16px; height: 16px; }
.acct-card.open .acct-chev { transform: rotate(90deg); color: var(--b-400); }
.acct-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-pill); display: grid;
  place-items: center; color: var(--t-3); flex: none; }
.acct-ic svg { width: 17px; height: 17px; }
.acct-name { font-size: 15px; font-weight: 700; color: var(--t-1); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 300px; }
.acct-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-left: 6px; }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--t-3); background: var(--bg-pill); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.acct-chip i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.acct-chip.up { color: var(--up); } .acct-chip.up i { background: var(--up); }
.acct-chip.mut { color: var(--t-4); } .acct-chip.mut i { background: var(--t-4); }
.acct-chip.down { color: var(--down); background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.28); }
.acct-chip.down i { background: var(--down); }
.acct-spend { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700; color: var(--t-1); flex: none; }
.acct-card:not(.open) .acct-body { display: none; }
.acct-body { border-top: 1px solid var(--line); }
.ctbl-flush { width: 100%; border-collapse: collapse; }
.ctbl-flush tbody tr:last-child td { border-bottom: 0; }

.rej-badge { font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--down); background: rgba(239,68,68,0.13); padding: 2px 8px; border-radius: 999px; margin-left: 8px; flex: none; }
.ctbl-row.is-rejected td { background: rgba(239,68,68,0.045); }

@media (max-width: 760px){ .acct-chips { display: none; } }

/* ════════════════════════════════════════════════════════════════════
   BIBLIOTECA DE CRIATIVOS
   ──────────────────────────────────────────────────────────────────── */
.lib-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.lib-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px; height: 42px;
  padding: 0 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); }
.lib-search svg { width: 16px; height: 16px; color: var(--t-4); flex: none; }
.lib-search input { flex: 1; background: none; border: 0; outline: none; color: var(--t-1); font: inherit; font-size: 13.5px; }
.lib-filters { display: flex; gap: 7px; }
.lib-fchip { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--bg-card); border: 1px solid var(--line); color: var(--t-3); text-decoration: none; font-size: 13px; font-weight: 600; }
.lib-fchip:hover { color: var(--t-1); border-color: var(--line-hi); }
.lib-fchip.on { background: #fff; color: #0c1622; border-color: #fff; }
.lib-fchip span { font-size: 11px; opacity: .7; }
.lib-fchip.on span { opacity: .6; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.lib-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: border-color .15s, transform .15s; }
.lib-card:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.lib-thumb { position: relative; aspect-ratio: 1 / 1; background: #07090e; overflow: hidden; display: grid; place-items: center; }
.lib-thumb video, .lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.6); color: #fff; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(2px); transition: transform .15s, background .15s; }
.lib-play:hover { transform: scale(1.08); background: rgba(0,0,0,0.6); }
.lib-play svg { width: 20px; height: 20px; margin-left: 2px; }
.lib-tag { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.55); padding: 3px 8px; border-radius: 7px; backdrop-filter: blur(3px); }
.lib-tag svg { width: 12px; height: 12px; }
.lib-del { position: absolute; top: 9px; right: 9px; opacity: 0; transition: opacity .15s; }
.lib-card:hover .lib-del { opacity: 1; }
.lib-del button { width: 30px; height: 30px; border-radius: 8px; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(3px); }
.lib-del button:hover { background: var(--down); border-color: var(--down); }
.lib-del button svg { width: 14px; height: 14px; }
.lib-meta { padding: 11px 13px; }
.lib-name { font-size: 13px; font-weight: 600; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-sub { font-size: 11.5px; color: var(--t-4); margin-top: 3px; font-family: "JetBrains Mono", monospace; }

.lib-empty { padding: 60px 24px; text-align: center; }
.lib-empty-ic { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(139,92,246,0.12); color: #a78bfa; }
.lib-empty-ic svg { width: 28px; height: 28px; }
.lib-empty-t { font-size: 16px; font-weight: 700; color: var(--t-1); margin-bottom: 6px; }
.lib-empty-s { font-size: 13px; color: var(--t-3); max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* logo única (imagem com texto) na sidebar */
.brand-logo { display: block; height: 72px; width: auto; max-width: 100%; object-fit: contain; margin: -10px 0; }
.app.nav-collapsed .brand-logo { height: 40px; margin: 0; }

/* ════════════════════════════════════════════════════════════════════
   PERFIL
   ──────────────────────────────────────────────────────────────────── */
.prof-id { display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 18px; }
.prof-av { width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--b-400), #7c3aed); }
.prof-id-main { flex: 1; }
.prof-name { font-size: 18px; font-weight: 700; color: var(--t-1); }
.prof-email { font-size: 13px; color: var(--t-3); margin-top: 2px; }
.prof-plan { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--b-300); background: rgba(91,151,245,0.13); border: 1px solid rgba(91,151,245,0.3); padding: 5px 12px; border-radius: 999px; }

.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.prof-card { padding: 20px 22px; }
.prof-card-h { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--t-1); margin-bottom: 6px; }
.prof-card-h svg { width: 17px; height: 17px; color: var(--b-300); }
.prof-card-d { font-size: 12.5px; color: var(--t-3); line-height: 1.55; margin-bottom: 16px; }
.prof-form { display: flex; flex-direction: column; gap: 12px; }
.prof-btn { align-self: flex-start; margin-top: 4px; }

.token-box { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border: 1px solid var(--line-hi);
  border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 14px; }
.token-box code { flex: 1; font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--t-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-copy { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--bg-pill);
  border: 1px solid var(--line-hi); color: var(--t-3); cursor: pointer; display: grid; place-items: center; }
.token-copy:hover { color: var(--t-1); border-color: var(--b-400); }
.token-copy.ok { color: var(--up); border-color: var(--up); }
.token-copy svg { width: 15px; height: 15px; }

.prof-plan-card { padding: 20px 22px; }
.prof-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.prof-plan-name { font-size: 15px; font-weight: 700; color: var(--t-1); }

@media (max-width: 820px){ .prof-grid { grid-template-columns: 1fr; } }

/* sucesso de recuperação de senha */
.auth-ok { display: flex; align-items: flex-start; gap: 10px; background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25); color: #86efac; border-radius: var(--r-md); padding: 13px 14px; font-size: 13px; line-height: 1.5; }
.auth-ok svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ── Vendas (KPIs reaproveitam .apl-kpi) ── */
.vnd-kpis { margin-bottom: 18px; }
.vnd-cur { font-size: 18px; color: var(--t-3); font-weight: 700; }
.vnd-test { font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--t-4);
  background: var(--bg-pill); padding: 2px 6px; border-radius: 5px; margin-left: 6px; }

/* ── Integrações ── */
.intg-how { padding: 20px 22px; margin-bottom: 18px; }
.intg-how-h { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--t-1); margin-bottom: 8px; }
.intg-how-h svg { width: 17px; height: 17px; color: var(--b-300); }
.intg-how p { font-size: 13px; color: var(--t-3); line-height: 1.6; margin-bottom: 14px; }
.intg-how code, .intg-how-p code { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--b-300); background: rgba(91,151,245,0.1); padding: 1px 6px; border-radius: 5px; }
.intg-field { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: 10px 12px; }
.intg-label { font-size: 10.5px; font-weight: 700; color: var(--up); background: rgba(34,197,94,0.13); padding: 3px 8px; border-radius: 6px; flex: none; }
.intg-field code { flex: 1; font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; padding: 0; }

.intg-tokens { padding: 20px 22px; }
.intg-tok-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.intg-new { display: flex; gap: 8px; }
.intg-new input { background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: 8px 12px; color: var(--t-1); font: inherit; font-size: 13px; outline: none; }
.intg-new input:focus { border-color: var(--b-400); }
.intg-new-btn { height: 38px; padding: 0 14px; font-size: 13px; }
.intg-tok-list { display: flex; flex-direction: column; gap: 10px; }
.intg-tok { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-input); }
.intg-tok.revoked { opacity: .5; }
.intg-tok-main { flex: 1; min-width: 0; }
.intg-tok-name { font-size: 13px; font-weight: 600; color: var(--t-1); margin-bottom: 3px; }
.intg-rev { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--down); background: rgba(239,68,68,0.12); padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.intg-tok-val { display: block; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--t-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intg-tok-meta { font-size: 11.5px; color: var(--t-4); flex: none; white-space: nowrap; }
.intg-tok-actions { display: flex; gap: 6px; flex: none; }
.token-copy.del:hover { color: var(--down); border-color: var(--down); background: rgba(239,68,68,0.08); }
.intg-empty { color: var(--t-4); font-size: 13px; padding: 20px; text-align: center; }
@media (max-width: 760px){ .intg-tok-meta { display: none; } }

/* grid de idiomas (cards selecionáveis) */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.lang-chip { position: relative; display: flex; align-items: center; padding: 11px 28px 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-hi); background: var(--bg-input); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--t-2);
  transition: border-color .15s, background .15s, color .15s; }
.lang-chip input { position: absolute; opacity: 0; pointer-events: none; }
.lang-chip:hover { border-color: var(--b-400); color: var(--t-1); }
.lang-chip:has(input:checked) { border-color: var(--b-400); background: rgba(91,151,245,0.1); color: var(--t-1); }
.lang-chip:has(input:checked)::after { content: "✓"; position: absolute; right: 12px; color: var(--b-300); font-weight: 700; }

/* seletor de biblioteca nas mídias do anúncio */
.libpick-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.libpick-tab { flex: 1; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line-hi);
  background: var(--bg-input); color: var(--t-3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.libpick-tab.on { background: rgba(139,92,246,0.14); color: #c4b5fd; border-color: rgba(139,92,246,0.4); }
.libpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.libpick-card { position: relative; border: 1px solid var(--line-hi); border-radius: var(--r-md); overflow: hidden;
  cursor: pointer; background: #07090e; transition: border-color .15s; }
.libpick-card:hover { border-color: var(--b-400); }
.libpick-card input { position: absolute; opacity: 0; pointer-events: none; }
.libpick-card video, .libpick-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.libpick-noimg { display: grid; place-items: center; aspect-ratio: 1/1; color: var(--t-4); font-size: 22px; }
.libpick-tag { position: absolute; top: 6px; left: 6px; font-size: 9.5px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.55); padding: 2px 6px; border-radius: 5px; }
.libpick-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5); background: rgba(0,0,0,0.35); transition: all .15s; }
.libpick-card:has(input:checked) { border-color: var(--b-400); box-shadow: 0 0 0 2px var(--b-400) inset; }
.libpick-card:has(input:checked) .libpick-check { background: var(--b-400); border-color: var(--b-400); }
.libpick-card:has(input:checked) .libpick-check::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; height: 100%; }
.libpick-name { display: block; font-size: 11px; color: var(--t-2); padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Templates de campanha ── */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.tpl-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.tpl-card-head { display: flex; align-items: center; gap: 12px; }
.tpl-card-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: rgba(139,92,246,0.14); color: #a78bfa; }
.tpl-card-ic svg { width: 19px; height: 19px; }
.tpl-card-name { font-size: 15px; font-weight: 700; color: var(--t-1); }
.tpl-def { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #a78bfa; background: rgba(139,92,246,0.14); padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
.tpl-card-desc { font-size: 12.5px; color: var(--t-3); margin-top: 2px; }
.tpl-card-rows { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tpl-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t-3); }
.tpl-row svg { width: 15px; height: 15px; color: var(--t-4); flex: none; }
.tpl-row b { color: var(--t-1); font-weight: 600; }
.tpl-row.mult { color: var(--t-4); font-size: 12px; }
.tpl-card-foot { display: flex; align-items: center; gap: 8px; }
.tpl-use { height: 36px; padding: 0 14px; font-size: 13px; }
.tpl-act { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line-hi); background: var(--bg-pill); color: var(--t-3); cursor: pointer; }
.tpl-act:hover { color: var(--t-1); border-color: var(--b-400); }
.tpl-act.del:hover { color: var(--down); border-color: var(--down); }
.tpl-act svg { width: 15px; height: 15px; }

/* seletor de template no topo do wizard */
.tpl-pick-card { background: linear-gradient(180deg, rgba(139,92,246,0.06), transparent); border-color: rgba(139,92,246,0.25); }
.tpl-pick { display: flex; align-items: center; gap: 14px; }
.tpl-pick-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: rgba(139,92,246,0.14); color: #a78bfa; }
.tpl-pick-ic svg { width: 19px; height: 19px; }
.tpl-pick-txt { flex: 1; display: flex; flex-direction: column; }
.tpl-pick-txt strong { font-size: 14px; color: var(--t-1); }
.tpl-pick-txt span { font-size: 12px; color: var(--t-3); }
.tpl-pick-sel { min-width: 200px; background: var(--bg-input); border: 1px solid var(--line-hi); border-radius: var(--r-md); padding: 10px 12px; color: var(--t-1); font: inherit; font-size: 13px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px){ .grid-3 { grid-template-columns: 1fr; } }

/* template carregado no wizard (destaque verde) */
.tpl-pick-card.tpl-loaded { border-color: rgba(34,197,94,0.35); background: linear-gradient(180deg, rgba(34,197,94,0.06), transparent); }
.tpl-pick-card.tpl-loaded .tpl-pick-ic { background: rgba(34,197,94,0.14); color: var(--up); }

/* ícone girando no botão de atualizar status */
.btn .spin { animation: spin 0.8s linear infinite; }
