/* ═══════════════════════════════════════════════════════════════════════════
   ABA DESEMPENHO (Rafa 07/nov · desempenho.js · prefixo dp-) · a linguagem das abas Ads e Lucro (06–07/nov)
   · superfície = a dos cards da aba Ads/Lucro: branco, fio #E5E9EF, canto 20px (16px KPI/meta), sombra suave
   · cabeçalhos de seção = .section-header.lk-header (ícone em círculo suave + título caixa-alta + fio)
   · filtros = o cartão .opb-bar (MÊS e, só no admin, PESSOA) no mesmo lugar das outras abas
   · cor da PESSOA nos gráficos = --dp-c (degrau 600 · validado no dataviz): PI #0D9488 · FE #C026D3 · copy #EA580C
   · avatar = .lk-ava com --ed (a cor do banco, igual às pílulas do Lucro)
   ═════════════════════════════════════════════════════════════════════════ */
.dp-view {
  --dp-line: #E5E9EF;
  --dp-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -16px rgba(15, 23, 42, .14);
  --lk-line: #E5E9EF;
  --lk-shadow: var(--dp-shadow);
  --dp-c: var(--primary);
  overflow-x: clip;
}
/* a aba esconde o mundo de Ads igual à Lucro (busca e NOVO AD do topo não servem aqui) */
body.view-desempenho .metrics,
body.view-desempenho .ads-section,
body.view-desempenho .page-footer,
body.view-desempenho .topbar-search,
body.view-desempenho .topbar-new-ad { display: none; }

.dp-bar { margin-bottom: 24px; }
.dp-bar .lk-bar-sub { margin-top: 0; padding-top: 0; border-top: 0; }
/* MÊS | PESSOA meio a meio (a fileira de pessoas é a mais comprida) */
.dp-bar .lk-bar-sub:not(.is-single) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dp-bar .opb-sec + .opb-sec { border-left: 1px solid #E2E6EB; }
.dp-sec + .dp-sec { margin-top: 40px; }
/* ícones das seções (círculo suave · mesma família dos .section-dot da aba Ads) */
.lk-header .dot-dp-month { background: #D1F3EA; color: #10B981; }
.lk-header .dot-dp-goal  { background: #FEF3C7; color: #D97706; }
.lk-header .dot-dp-chart { background: #E0F2FE; color: #0284C7; }
.lk-header .dot-dp-best  { background: #FAE8FF; color: #A21CAF; }
.lk-header .dot-dp-team  { background: #EBEFF6; color: #475569; }
.dp-updated { font-size: 11.5px; font-weight: 500; color: var(--ink-400); white-space: nowrap; }
.dp-updated.is-old { color: #B45309; }
.dp-avisos { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.dp-avisos .lk-note { border: 1px solid #FDE68A; border-radius: 12px; background: #FFFBEB; padding: 7px 12px; color: #92400E; }
.dp-avisos .lk-note-ic { background: #FEF3C7; color: #D97706; }
.dp-avisos .lk-note-txt { white-space: normal; }
.dp-avisos .dp-link { font-size: 12.5px; }

/* superfície base */
.dp-card {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--dp-line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--dp-shadow);
}
.dp-lbl {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500);
}
.dp-lbl > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp-lbl > svg { width: 13px; height: 13px; flex: none; color: var(--ink-400); }

/* esqueleto enquanto a parte pesada (%, ROI) chega · brilho suave, sem piscar */
.dp-skel {
  display: inline-block; vertical-align: middle; max-width: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #EEF1F5 0%, #F6F8FB 40%, #EEF1F5 80%);
  background-size: 300% 100%;
  animation: dpShimmer 1.4s ease-in-out infinite;
}
.dp-skel-video { width: 128px; aspect-ratio: 9 / 16; height: auto; border-radius: 12px; display: block; }
.dp-skel-bar { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; }
@keyframes dpShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .dp-skel { animation: none; } }

/* vazio / erro */
.dp-empty { display: flex; align-items: center; gap: 14px; padding: 20px; color: var(--ink-500); }
.dp-empty > svg { width: 22px; height: 22px; flex: none; color: var(--ink-300); }
.dp-empty > div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.45; }
.dp-empty b { color: var(--ink-900); font-weight: 600; }
.dp-empty.is-error > svg { color: #D97706; }
.dp-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 12.5px var(--font); color: var(--primary-deep);
}
.dp-link svg { width: 13px; height: 13px; }
.dp-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ── SEU MÊS · herói (1 número grande por tela) + 2 KPIs ── */
.dp-hero { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)); gap: 12px; }
.dp-main { display: flex; flex-direction: column; gap: 14px; }
.dp-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; row-gap: 8px; }
.dp-who .lk-ava { width: 34px; height: 34px; font-size: 11.5px; }
.dp-who-name { font-size: 15px; font-weight: 600; color: var(--ink-900); line-height: 1.2; }
.dp-who-role { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); }
.dp-who .dp-pace { margin-left: auto; }
.dp-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
/* número grande: algarismo PROPORCIONAL (tabular-nums só em coluna/eixo) */
.dp-big-num { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: .95; color: var(--ink-900); }
.dp-big-of { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-300); }
.dp-big-lbl { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.dp-big-sub { font-size: 12.5px; line-height: 1.45; color: var(--ink-500); margin-top: 4px; }
.dp-big-sub b { color: var(--ink-900); font-weight: 700; }

/* ritmo / projeção (ícone + texto · nunca só cor) */
.dp-pace {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 11px 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--primary-soft); color: var(--primary-deep); box-shadow: inset 0 0 0 1px var(--primary-line);
}
.dp-pace svg { width: 14px; height: 14px; flex: none; }
.dp-pace.is-low { background: var(--warning-soft); color: #B45309; box-shadow: inset 0 0 0 1px var(--warning-line); }
.dp-pace.is-flat { background: #F6F8FB; color: var(--ink-500); box-shadow: inset 0 0 0 1px #E2E8F0; }

/* trilha das metas: 4 níveis de largura igual (0→84 · 84→124 · 124→168 · 168→252), cada um enche no seu trecho */
.dp-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.dp-step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dp-step-bar { position: relative; height: 10px; border-radius: 999px; background: #EEF1F5; overflow: hidden; }
.dp-step-bar > i {
  position: absolute; inset: 0 auto 0 0; width: var(--p, 0%);
  border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  transition: width var(--t-slow) var(--ease);
}
.dp-step.is-done .dp-step-bar,
.dp-step.is-cur .dp-step-bar { background: var(--primary-soft); box-shadow: inset 0 0 0 1px #D1FAE5; }
.dp-step-lbl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-step-lbl b { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.dp-step-lbl b svg { width: 13px; height: 13px; color: var(--primary); flex: none; }
.dp-step-lbl small { font-size: 11px; font-weight: 600; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-step.is-lock .dp-step-lbl b,
.dp-step.is-lock .dp-step-lbl small { color: var(--ink-400); }

/* KPIs ao lado do herói */
.dp-kpi { display: flex; flex-direction: column; gap: 8px; border-radius: 16px; padding: 16px; }
.dp-kpi-val { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; color: var(--ink-900); white-space: nowrap; }
.dp-kpi-sub { font-size: 12px; line-height: 1.45; color: var(--ink-500); }
.dp-kpi-sub b { color: var(--ink-700); font-weight: 700; }
.dp-kpi.is-pay { background: var(--primary-soft); border-color: var(--primary-line); }
.dp-kpi.is-pay .dp-kpi-val { color: var(--primary-deep); }
.dp-kpi.is-pay .dp-lbl > svg { color: var(--primary); }
.dp-kpi .dp-seg { margin-top: auto; }

/* barra fina de parte-do-todo (assertividade): validaram · rodaram sem validar · ainda não rodaram */
.dp-seg { display: flex; gap: 2px; height: 8px; }
.dp-seg > i { display: block; height: 100%; border-radius: 999px; background: var(--k); flex: none; }
.dp-acc-list { display: grid; gap: 4px; margin-top: 2px; }
.dp-acc-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-500); }
.dp-acc-row i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); flex: none; }
.dp-acc-row b { margin-left: auto; color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.k-ok { --k: var(--primary); }
.k-run { --k: #94A3B8; }
.k-new { --k: #E2E8F0; }

/* ── METAS · 1 cartão por faixa, cada um com a sua barra ── */
.dp-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dp-tier { display: flex; flex-direction: column; gap: 10px; border-radius: 16px; padding: 16px; }
.dp-tier-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dp-tier-name { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); white-space: nowrap; }
.dp-tier-state {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: #EBEFF6; color: #64748B;
}
.dp-tier-state svg { width: 12px; height: 12px; }
.dp-tier-goal { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink-900); }
.dp-tier-goal small { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-400); margin-left: 4px; }
.dp-tier-reward { font-size: 12.5px; line-height: 1.45; color: var(--ink-500); min-height: 2.9em; }
.dp-tier-reward b { color: var(--ink-900); font-weight: 700; }
.dp-tier-calc { color: var(--primary-deep); font-weight: 600; white-space: nowrap; }
.dp-meter { height: 6px; border-radius: 999px; background: #EEF1F5; overflow: hidden; margin-top: auto; }
.dp-meter > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-deep)); transition: width var(--t-slow) var(--ease); }
.dp-tier-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-tier-left { font-weight: 700; color: var(--ink-700); }
.dp-tier.is-next .dp-tier-left { color: var(--ink-900); }
.dp-tier.is-done { background: var(--primary-soft); border-color: var(--primary-line); }
.dp-tier.is-done .dp-tier-state { background: #fff; color: var(--primary-deep); box-shadow: inset 0 0 0 1px var(--primary-line); }
.dp-tier.is-done .dp-meter { background: #fff; }
/* a PRÓXIMA a bater: anel verde fino + selo escuro */
.dp-tier.is-next { border-color: var(--primary-line); box-shadow: 0 0 0 3px rgba(16, 185, 129, .10), var(--dp-shadow); }
.dp-tier.is-next .dp-tier-state { background: var(--ink-900); color: #fff; }
.dp-tier.is-lock .dp-tier-state { width: 22px; padding: 0; justify-content: center; background: #F1F5F9; color: var(--ink-400); }
/* mês fechado: a meta que não chegou (no lugar do "próxima") */
.dp-tier.is-miss .dp-tier-state { background: #FFF4E5; color: #B45309; }
.dp-tier.is-next .dp-meter { background: var(--primary-soft); }
.dp-tier.is-lock .dp-tier-goal { color: var(--ink-400); }

/* ── RITMO DO MÊS (gráfico) + COMISSÃO lado a lado ── */
.dp-duo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.dp-chart-card { display: flex; flex-direction: column; gap: 12px; }
.dp-chart-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink-500); }
.dp-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dp-legend i { width: 14px; height: 2px; border-radius: 1px; background: var(--k); flex: none; }
.dp-legend i.is-dash { height: 0; background: none; border-top: 2px dotted var(--k); }
.dp-legend i.is-goal { height: 0; background: none; border-top: 1px dashed #94A3B8; }
.dp-legend b { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-toggle {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--dp-line); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  font: 600 12px var(--font); color: var(--ink-700); cursor: pointer;
}
.dp-toggle svg { width: 13px; height: 13px; }
@media (hover: hover) { .dp-toggle:hover { border-color: #CBD5E1; color: var(--ink-900); } }
.dp-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dp-chart { position: relative; width: 100%; min-height: 200px; }
.dp-chart svg { display: block; overflow: visible; }
.dp-chart text { font-family: var(--font); }
.dp-chart .ax { font-size: 10.5px; font-weight: 500; fill: var(--ink-500); font-variant-numeric: tabular-nums; }
.dp-chart .ax.is-today { fill: var(--ink-900); font-weight: 700; }
.dp-chart .grid { stroke: #EEF2F6; stroke-width: 1; shape-rendering: crispEdges; }
.dp-chart .base { stroke: #CBD5E1; stroke-width: 1; shape-rendering: crispEdges; }
/* metas = limiar → tracejado (a grade é sólida) · alcançada = verde · próxima = cinza escuro · futura = clarinha */
.dp-chart .goal { stroke: #94A3B8; stroke-width: 1; stroke-dasharray: 4 4; shape-rendering: crispEdges; }
.dp-chart .goal.is-done { stroke: var(--primary); }
.dp-chart .goal.is-lock { stroke: #CBD5E1; }
.dp-chart .goal-lbl { font-size: 10.5px; font-weight: 700; fill: var(--ink-700); font-variant-numeric: tabular-nums; }
.dp-chart .goal-lbl.is-lock { fill: var(--ink-400); }
.dp-chart .goal-lbl.is-done { fill: var(--primary-deep); }
.dp-chart .goal-lbl .sub { font-weight: 500; fill: var(--ink-500); }
.dp-chart .area { fill: var(--dp-c); opacity: .10; }
.dp-chart .line { fill: none; stroke: var(--dp-c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dp-chart .proj { fill: none; stroke: var(--dp-c); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; opacity: .8; }
.dp-chart .dot { fill: var(--dp-c); stroke: #fff; stroke-width: 2; }
.dp-chart .dot.is-proj { fill: #fff; stroke: var(--dp-c); }
.dp-chart .end-lbl { font-size: 11px; font-weight: 700; fill: var(--ink-900); font-variant-numeric: tabular-nums; }
.dp-chart .bar { fill: var(--dp-c); }
.dp-chart .xh { stroke: #94A3B8; stroke-width: 1; shape-rendering: crispEdges; }
.dp-chart .hit { fill: transparent; outline: none; cursor: crosshair; }
.dp-chart-sub { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; fill: var(--ink-400); }
.dp-tip {
  position: absolute; top: 4px; z-index: 5; width: 184px; pointer-events: none;
  background: #fff; border: 1px solid #CBD5E1; border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px -2px rgba(15, 23, 42, .08);
  font-size: 11.5px; line-height: 1.45; color: var(--ink-500);
}
.dp-tip-h { font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.dp-tip-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-tip-r.is-sub { padding-left: 18px; margin-bottom: 2px; }
.dp-tip-r b { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-tip-r i { width: 12px; height: 2px; border-radius: 1px; background: var(--k); display: inline-block; margin-right: 6px; vertical-align: middle; }
/* versão em números do gráfico (o "Tabela") */
.dp-table { display: grid; font-size: 12px; max-height: 340px; overflow-y: auto; }
.dp-table > span { padding: 6px 10px; border-bottom: 1px solid #EEF1F5; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-700); }
.dp-table > .th { position: sticky; top: 0; background: #fff; font: 700 9.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); border-bottom-color: var(--line-strong); }

/* comissão = recibo · cada linha com a conta */
.dp-pay { display: flex; flex-direction: column; }
.dp-pay .dp-lbl { margin-bottom: 4px; }
.dp-pay-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid #EEF1F5; font-size: 13px; color: var(--ink-700);
}
.dp-pay .dp-lbl + .dp-pay-row { border-top: 0; }
.dp-pay-row > span { min-width: 0; }
.dp-pay-row small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--ink-400); }
.dp-pay-row b { flex: none; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-pay-row.is-neg b { color: #B45309; }
.dp-pay-row.is-off b { color: var(--ink-300); font-weight: 600; }
.dp-pay-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 6px; padding: 12px 14px; border-radius: 14px;
  background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-line);
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--primary-deep);
}
.dp-pay-total b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; text-transform: none; white-space: nowrap; }
.dp-pay-hint { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; line-height: 1.45; color: var(--ink-500); }
.dp-pay-hint .lk-note-ic { background: #FEF3C7; color: #D97706; }
.dp-pay-hint b { color: var(--ink-900); }

/* ── MELHORES · 1 card por ad, 2 por linha (Rafa 08/nov · img02) · topo: AD + título + quantos vídeos + oferta ·
   corpo: a faixa dos vídeos (hook e ROI em cada) e, do lado, o detalhe do vídeo escolhido com o "Ver copy" ── */
.dp-best { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.dp-best > .dp-bc:last-child:nth-child(odd) { grid-column: 1 / -1; }
.dp-bc { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dp-bc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dp-bc-head .card-number { flex: none; }
.dp-bc-title {
  margin: 0; flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-bc-count {
  flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  background: #F1F5F9; color: var(--ink-500); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.dp-bc-offer { flex: none; display: inline-flex; margin-left: auto; }
.dp-bc-body { display: flex; gap: 16px; align-items: stretch; min-width: 0; flex: 1; }
.dp-bc-strip {
  display: flex; gap: 10px; flex: 0 1 auto; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin; padding: 3px 3px 6px;
}
.dp-bc-vid { flex: none; width: 108px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; }
.dp-bc-vid .mini-version, .dp-bc-vid .mini-version-frame { width: 108px; }
.dp-bc-vid .mini-version-sub { display: none; }
.dp-bc-vid .mini-version-frame { outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.dp-bc-vid.is-on .mini-version-frame { outline-color: var(--primary); }
.dp-bc-vid .dp-skel-video { width: 100%; }
.dp-bc-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 26px; padding: 0 3px 0 9px;
  border-radius: 999px; border: 1px solid var(--dp-line); background: #fff; cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s;
}
.dp-bc-pick .dp-roi { height: 18px; padding: 0 6px; font-size: 10.5px; }
.dp-bc-vid.is-on .dp-bc-pick { border-color: var(--primary-line); background: var(--primary-soft); }
.dp-bc-vid.is-on .dp-bc-pick .dp-hk { color: var(--primary-deep); }
@media (hover: hover) { .dp-bc-pick:hover { border-color: var(--primary-line); } }
.dp-bc-pick:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* largura FIXA: com 3+ vídeos a faixa apertava o painel até 200px e cortava o Lucro/Gasto (revisão 08/nov) · a faixa
   encolhe e rola de lado */
.dp-bc-info { flex: 0 0 300px; width: 300px; min-width: 0; display: flex; flex-direction: column; }
.dp-bc-det { display: none; flex-direction: column; gap: 10px; height: 100%; }
.dp-bc-det.is-on { display: flex; }
.dp-bc-det-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-bc-hook {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-700);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dp-bc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dp-bc-stats span { display: flex; flex-direction: column; gap: 2px; padding: 8px 9px; border-radius: 10px; background: #F6F8FB; min-width: 0; }
.dp-bc-stats small { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); }
.dp-bc-stats b {
  font-size: 13px; font-weight: 700; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.dp-bc-stats b.is-pos { color: var(--primary-deep); }
.dp-bc-stats b.is-neg { color: #B91C1C; }
.dp-bc-det .dp-copy-btn { margin-top: auto; }
.dp-bc-det .dp-copy-btn svg:last-child { width: 12px; height: 12px; margin-left: -2px; }
.dp-novideo { display: grid; place-items: center; aspect-ratio: 9 / 16; background: #F1F5F9; color: var(--ink-400); font-size: 11px; font-weight: 600; border-radius: 12px; }
.dp-hk { font: 700 10px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); white-space: nowrap; }
.dp-roi {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--primary-soft); color: var(--primary-deep);
}
.dp-roi.roi-mid { background: var(--warning-soft); color: #B45309; }
.dp-roi.roi-bad { background: var(--danger-soft); color: #B91C1C; }
.dp-copy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  height: 32px; border-radius: 999px; border: 1px solid var(--dp-line); background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  font: 600 12px var(--font); color: var(--ink-700); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.dp-copy-btn svg { width: 13px; height: 13px; }
@media (hover: hover) { .dp-copy-btn:hover { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary-deep); } }
.dp-copy-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* toque: expandir/baixar do vídeo sempre à vista (no app eles só aparecem no hover) */
@media (hover: none) { .dp-view .video-expand-btn, .dp-view .mini-version-action, .dp-modal .video-expand-btn, .dp-modal .mini-version-action { opacity: 1; } }

/* ── ADMIN · EQUIPE (agrupado) ── */
.dp-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.dp-kpis .dp-kpi-val { font-size: 26px; }
.dp-people { padding: 4px 18px; }
.dp-person {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: minmax(150px, 1fr) minmax(240px, 2.3fr) repeat(3, minmax(84px, .7fr)) 104px 18px;
  padding: 14px 0; border-top: 1px solid #EEF1F5; cursor: pointer;
}
.dp-person:first-child { border-top: 0; }
.dp-person:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 12px; }
.dp-person .dp-who-name { font-size: 14px; }
.dp-pprog { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dp-pprog-num { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-pprog-num b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-900); }
.dp-pprog .dp-ladder { gap: 2px; }
.dp-pprog .dp-step-bar { height: 6px; }
.dp-pstat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dp-pstat small { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); white-space: nowrap; }
.dp-pstat b { font-size: 14px; font-weight: 700; color: var(--ink-900); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-pstat b small { display: inline; margin-left: 5px; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--ink-400); font-weight: 600; }
.dp-pstat b.is-pay { color: var(--primary-deep); }
.dp-spark { display: block; width: 104px; height: 30px; overflow: visible; }
.dp-spark path { fill: none; stroke: var(--dp-c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dp-spark circle { fill: var(--dp-c); stroke: #fff; stroke-width: 2; }
.dp-chev { display: inline-flex; color: var(--ink-300); }
.dp-chev svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .dp-person:hover .dp-chev { color: var(--ink-700); }
  .dp-person:hover .dp-who-name { color: var(--primary-deep); }
}

/* ── MODAL DA COPY (família do .newad-overlay · celular = folha de baixo) ── */
body.dp-modal-lock { overflow: hidden; }
.dp-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px);
  animation: fadeIn var(--t-base) var(--ease);
}
.dp-modal-overlay[hidden] { display: none; }
.dp-modal {
  width: 100%; max-width: 880px; max-height: min(88vh, 860px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--dp-line, #E5E9EF); border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: popIn var(--t-base) var(--ease);
}
.dp-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 16px; border-bottom: 1px solid #EEF1F5; }
.dp-modal-head > div:first-child { min-width: 0; }
.dp-modal-head h3 { margin: 8px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink-900); }
.dp-modal-head .dp-lang { margin-left: auto; align-self: center; }
.dp-modal-close { margin-left: auto; flex: none; }
.dp-modal-head .dp-lang + .dp-modal-close { margin-left: 0; }
.dp-modal-close svg { width: 18px; height: 18px; }
.dp-modal-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dp-modal-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 20px; min-height: 0; flex: 1; }
.dp-modal-video { display: flex; flex-direction: column; gap: 12px; }
.dp-modal-video .mini-version, .dp-modal-video .mini-version-frame { width: 200px; }
.dp-modal-video .mini-version-sub { display: none; }
/* os 3 números empilhados na coluna de 200px (rótulo à esquerda, valor à direita · lado a lado não cabia "RECEITA LÍQ."
   nem R$ de 6 dígitos) · no celular (folha de baixo, largura toda) voltam a 3 colunas */
.dp-modal-stats { display: flex; flex-direction: column; gap: 4px; }
.dp-modal-stats span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #F6F8FB; min-width: 0; }
.dp-modal-stats small { font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); white-space: nowrap; flex: none; }
.dp-modal-stats b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 700; color: var(--ink-900); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-modal-copy { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding-right: 4px; }
/* tela baixa (notebook 1366×768 com abas, zoom de 150%): a linha da grade não passa da altura do modal e a coluna do
   vídeo rola também (sem isso o fim da copy e os números ficavam cortados, sem dar pra rolar até eles) */
@media (min-width: 641px) {
  .dp-modal-body { grid-template-rows: minmax(0, 1fr); }
  .dp-modal-video { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
}
.dp-copy-block { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: #F6F8FB; }
.dp-copy-block.is-hook { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-line); }
.dp-copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-copy-txt { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-900); white-space: pre-wrap; letter-spacing: -0.005em; }
.dp-copy-head .hook-label { background: #fff; }
.dp-copy-block:not(.is-hook) .hook-label { color: var(--ink-500); }
.dp-copy-empty { margin: 0; font-size: 13px; color: var(--ink-500); }

/* ═══ TELAS ═══ */
@media (max-width: 1280px) {
  .dp-person { grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr) repeat(3, minmax(80px, .7fr)) 18px; }
  .dp-person .dp-spark { display: none; }
}
@media (max-width: 1180px) {
  .dp-best { grid-template-columns: minmax(0, 1fr); }
  .dp-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-hero > .dp-main { grid-column: 1 / -1; }
  .dp-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  /* 5 KPIs: 3 em cima e 2 embaixo, sem buraco */
  .dp-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dp-kpis > * { grid-column: span 2; }
  .dp-kpis > :nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 720px) {
  .dp-bar { margin-bottom: 18px; }
  .dp-bar .opb-sec + .opb-sec { border-left: 0; }
  /* no celular o subtítulo da seção quebra em vez de cortar (aqui ele carrega a regra da meta) */
  .dp-view .lk-sub { white-space: normal; overflow: visible; }
  .dp-card { border-radius: 16px; padding: 14px; }
  .dp-kpi, .dp-tier { padding: 13px; border-radius: 14px; }
  .dp-hero, .dp-tiers, .dp-kpis { gap: 8px; }
  .dp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-kpis > *, .dp-kpis > :nth-child(n+4) { grid-column: auto; }
  .dp-kpis > :first-child { grid-column: 1 / -1; }
  /* vídeos do mesmo ad: 1 faixa que rola de lado (no PC eles quebram de linha) */
  .dp-bc-strip { scrollbar-width: none; margin: 0 -14px; padding: 3px 14px 4px; scroll-padding: 0 14px; }
  .dp-bc-strip::-webkit-scrollbar { display: none; }
  .dp-big-num { font-size: 48px; }
  .dp-kpi-val { font-size: 24px; }
  .dp-tier-goal { font-size: 22px; }
  .dp-tier-reward { font-size: 12px; }
  .dp-chart-top { flex-direction: column; }
  .dp-best { gap: 12px; }
  .dp-bc-head { flex-wrap: wrap; row-gap: 6px; }
  .dp-bc-title { flex: 1 1 calc(100% - 72px); }
  .dp-bc-offer { margin-left: 0; }
  .dp-bc-body { flex-direction: column; gap: 12px; }
  .dp-bc-info { width: auto; max-width: none; min-width: 0; flex: none; }
  .dp-people { padding: 2px 14px; }
  .dp-empty { padding: 16px; }
}
/* linhas "Por pessoa": a grade de 6 colunas pede ~680px de conteúdo · até 820px (tablet em pé, janela pela metade)
   empilha igual ao celular: nome + seta, a régua das metas e os 3 números embaixo */
@media (max-width: 820px) {
  .dp-person {
    grid-template-columns: minmax(0, 1fr) repeat(3, auto) 12px;
    grid-template-areas: "who who who who chev" "prog prog prog prog prog" "s1 s2 s3 . .";
    gap: 10px 16px;
  }
  .dp-person > .dp-who { grid-area: who; }
  .dp-person > .dp-pprog { grid-area: prog; }
  .dp-person > .dp-pstat.is-tier { grid-area: s1; }
  .dp-person > .dp-pstat.is-pay { grid-area: s2; }
  .dp-person > .dp-pstat.is-acc { grid-area: s3; }
  .dp-person > .dp-chev { grid-area: chev; justify-self: end; }
}
@media (max-width: 640px) {
  .dp-modal-overlay { align-items: flex-end; padding: 0; }
  .dp-modal {
    max-width: none; max-height: 92vh; max-height: 92dvh;
    border-radius: 20px 20px 0 0; border-bottom: 0;
    animation: dpSheetIn var(--t-slow) var(--ease);
  }
  .dp-modal-head { padding: 16px 16px 12px; }
  .dp-modal-head h3 { font-size: 16px; }
  .dp-modal-body { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 16px 20px; overflow-y: auto; }
  .dp-modal-copy { overflow: visible; padding-right: 0; }
  .dp-modal-video { align-items: center; }
  .dp-modal-video .mini-version, .dp-modal-video .mini-version-frame { width: 150px; }
  .dp-modal-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dp-modal-stats span { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 8px; }
  .dp-modal-stats b { max-width: 100%; }
}
/* celular estreito: o selo da meta vira só o ícone (o anel verde já marca a próxima) */
@media (max-width: 400px) {
  .dp-tier-state { width: 22px; padding: 0; justify-content: center; }
  .dp-tier-state > span { display: none; }
}
@media (max-width: 340px) { .dp-step-lbl small { display: none; } }
@keyframes dpSheetIn { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }

/* próximo passo dentro do card da comissão (o que falta e quanto vale) */
.dp-next { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--primary-line); }
.dp-next-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-500); }
.dp-next-top b { color: var(--primary-deep); font-weight: 700; white-space: nowrap; }
.dp-next-top span b { color: var(--ink-900); }
.dp-next .dp-meter { background: #fff; margin-top: 0; }
.dp-next small { font-size: 11px; font-weight: 600; color: var(--ink-500); }
.dp-next.is-max b { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--primary-deep); }
.dp-next.is-max svg { width: 14px; height: 14px; }
/* mês fechado abaixo da meta mínima: o informativo do abate (Rafa 08/nov · no mês aberto o fixo aparece cheio) */
.dp-next.is-abate { border-top-color: #F5D9B8; }
.dp-next.is-abate .dp-next-top span { color: var(--ink-700); font-weight: 600; }
.dp-next.is-abate .dp-next-top b { color: #B45309; }
.dp-next.is-abate small { line-height: 1.45; }
@media (max-width: 720px) {
  /* no celular os ícones dos rótulos dos KPIs saem (o rótulo inteiro cabe na coluna) */
  .dp-kpi .dp-lbl > svg { display: none; }
  .dp-next-top { flex-wrap: wrap; }
}
/* celular: o herói vira 1 coluna (número, comissão e assertividade, cada um na largura toda) */
@media (max-width: 520px) {
  .dp-hero { grid-template-columns: minmax(0, 1fr); }
  .dp-hero > .dp-main { grid-column: auto; }
}
