/* Palco no estilo do UI Kit macOS 27 (Figma, modo escuro): janela cinza-grafite, grupos em cápsula na barra,
   cantos grandes, controles em cápsula, azul do sistema como cor de destaque e vidro fosco na barra.
   Valores vêm das variáveis do kit: Labels 85/55%, Fills 10/8/5%, Accents Blue #0091ff / #0a99ff. */
:root {
  color-scheme: dark;
  --page: #1c1c1e;         /* fundo da janela */
  --surface: #28282b;      /* cartões e painéis (fill 5% sobre a janela) */
  --surface-2: #313135;    /* seleção, chips */
  --surface-3: #3b3b40;    /* selos neutros, botão secundário */
  --field: rgba(255, 255, 255, 0.07); /* campos de texto */
  --ink: #ececee;          /* Labels/Primary */
  --ink-2: #a0a0a5;        /* Labels/Secondary */
  --muted: #8e8e93;        /* texto apagado: eixos, legendas */
  --rule: rgba(255, 255, 255, 0.09);
  --rule-strong: rgba(255, 255, 255, 0.16);
  --grid: rgba(255, 255, 255, 0.07);
  --acc: #0a99ff;          /* destaque (texto, linha do gráfico, grade de horário) */
  --acc-fill: #0a84ff;     /* fundo do botão principal e do item ativo */
  --glass: rgba(44, 44, 47, 0.66); /* barra: vidro fosco */
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-on: rgba(255, 255, 255, 0.16);
  --good: #30d158;         /* variação positiva */
  --critical: #ff6b66;     /* variação negativa e falha de envio */
  --alert: #ff5a52;        /* avisos e erros de formulário */

  /* Uma cor por rede: fundo dos chips e da rosca. --ink-c é a cor do texto sobre ela. */
  --instagram: #c13584;
  --tiktok: #0aa89e;
  --youtube: #e62117;

  --radius: 20px;
  --radius-btn: 12px;
  --radius-sm: 10px;
  --capsule: 999px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
main p a:not(.btn), main .small a:not(.btn) {
  color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
main p a:not(.btn):hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--font); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }

/* Estrutura: barra superior no computador, barra inferior no celular. */
/* align-content: start: em página curta o espaço que sobra fica embaixo, não entre a barra e o conteúdo. */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 100vh; }
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0 20px;
  height: 64px; padding: 0 max(32px, calc((100% - 1240px) / 2 + 32px));
  background: rgba(28, 28, 30, 0.72); border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(1.8) blur(28px); backdrop-filter: saturate(1.8) blur(28px);
}
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--ink-2); font: 500 14px var(--font); text-decoration: none;
}
.nav a:hover { color: var(--ink); }
.nav svg { display: none; }
/* Marca, abas logo depois e as ações no fim da barra. */
.nav .brand { flex: none; margin-right: 12px; gap: 10px; color: var(--ink); font: 700 18px/1 var(--font); letter-spacing: -0.02em; }
.nav .brand img { width: 26px; height: 26px; }
.nav .brand:hover { color: var(--ink); }
/* As abas formam um grupo em cápsula, como na barra de ferramentas do macOS; a ativa é uma pílula mais clara. */
.nav-tabs {
  flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: var(--capsule); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--rule);
}
.nav-acoes { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.nav-tabs a { height: 34px; padding: 0 16px; border-radius: var(--capsule); }
.nav-tabs a[aria-current="page"] { color: #fff; background: var(--glass-on); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
/* Seletores com ".nav" na frente para ganhar de ".nav a" (cor e fonte). */
.nav .nav-new {
  align-self: center; flex: none; height: 38px; padding: 0 18px 0 14px; gap: 6px;
  border-radius: var(--capsule); background: var(--acc-fill); color: #fff; font: 600 14px var(--font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.nav .nav-new:hover, .nav .nav-new[aria-current="page"] { background: #3395ff; color: #fff; }
.nav .nav-new svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav .nav-conta { flex: none; align-items: center; color: var(--ink); }
.nav .nav-conta:hover { color: var(--ink); }
.nav-conta[aria-current="page"] .iniciais { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--acc); }
.iniciais {
  width: 36px; height: 36px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: linear-gradient(160deg, #5a5a60, #3b3b40); color: #fff; font: 700 13px/1 var(--font);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.conta-txt { display: none; }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 32px 72px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--ink-2); margin-top: 6px; }

@media (max-width: 860px) {
  /* No celular a barra vira uma cápsula de vidro flutuante, no pé da tela. */
  .nav {
    position: fixed; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: 12px; right: 12px; height: auto; z-index: 20;
    gap: 0; padding: 4px 6px; border: 1px solid var(--glass-line); border-radius: 30px; background: var(--glass);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: saturate(1.8) blur(28px); backdrop-filter: saturate(1.8) blur(28px);
  }
  .nav .brand, .nav .nav-desk { display: none; }
  .nav-tabs, .nav-acoes { display: contents; }
  .nav a {
    flex: 1 1 0; flex-direction: column; justify-content: center; gap: 5px; min-height: 56px; padding: 8px 2px 6px;
    font: 500 11px/1.2 var(--font); color: var(--ink-2); order: 3;
  }
  .nav a > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .nav [data-nav="painel"], .nav [data-nav="agenda"] { order: 1; }
  .nav-tabs { padding: 0; gap: 0; background: none; box-shadow: none; border-radius: 0; }
  .nav-acoes { margin-left: 0; gap: 0; }
  .nav-tabs a { height: auto; border-radius: 22px; padding: 8px 2px 6px; }
  /* A aba ativa vira uma pílula mais clara atrás do ícone. */
  .nav-tabs a[aria-current="page"] { box-shadow: none; color: #fff; background: var(--glass-on); }
  /* "Novo vídeo" no meio da barra, num bloco azul. */
  .nav .nav-new {
    order: 2; flex: 1.25 1 0; align-self: center; height: auto; min-height: 52px; margin: 2px 4px; padding: 8px 2px 6px;
    flex-direction: column; gap: 5px; border-radius: 22px; background: var(--acc-fill); color: #fff; font: 600 11px/1.2 var(--font);
  }
  .nav .nav-new:hover { background: #3395ff; }
  .nav .nav-new svg { color: #fff; width: 21px; height: 21px; }
  .nav .nav-conta { order: 3; flex-direction: column; gap: 5px; min-height: 56px; padding: 8px 2px 6px; border-radius: 22px; font: 500 11px/1.2 var(--font); color: var(--ink-2); }
  .nav .nav-conta[aria-current="page"] { color: #fff; background: var(--glass-on); }
  .nav .nav-conta[aria-current="page"] .iniciais { box-shadow: 0 0 0 1.5px var(--acc); }
  .nav .iniciais { width: 22px; height: 22px; font-size: 9px; }
  .conta-txt { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; line-height: 1.25; }
  .conta-txt b { font: inherit; font-size: 11px; color: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .conta-txt span { display: none; }
  main { padding: 24px 16px 124px; }
  h1 { font-size: 24px; }}

/* Blocos: cartões em superfície, borda sutil e raio de 14 px. */
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.grid { display: grid; gap: 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Botões: primário branco com texto escuro; secundário em superfície com borda sutil; texto sublinhado. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 18px; border-radius: var(--capsule); border: 1px solid var(--rule);
  background: var(--surface-3); color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; text-decoration: none;
  white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.btn:hover { background: #46464c; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:disabled:hover { background: var(--surface-3); }
.btn-primary { background: var(--acc-fill); border-color: transparent; color: #fff; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-primary:hover { background: #3395ff; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--acc); padding: 0 10px; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn.btn-danger { border-color: rgba(255, 107, 102, 0.35); color: var(--critical); }
.btn-ghost.btn-danger { border-color: transparent; color: var(--critical); }
.btn-ghost.btn-danger:hover { background: rgba(255, 107, 102, 0.12); }
.btn-icon { width: 38px; padding: 0; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Segmentado: caixa de superfície; a opção escolhida fica em #2a2a31. */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; max-width: 100%;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--rule); border-radius: var(--capsule);
}
.stack > .seg { align-self: flex-start; }
.seg button {
  border: 0; background: transparent; color: var(--ink-2); font: 500 13px/1 var(--font);
  min-height: 32px; padding: 0 14px; cursor: pointer; border-radius: var(--capsule);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--glass-on); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
/* Abas de texto (assistente de configuração): sublinhado azul na aba ativa. */
.seg.tabs { padding: 0; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; width: 100%; gap: 0 26px; }
.seg.tabs button { min-height: 0; padding: 0 0 10px; border: 0; border-radius: 0; background: none; color: var(--ink-2); font: 600 15px var(--font); }
.seg.tabs button:hover { background: none; color: var(--ink); }
.seg.tabs button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--acc); background: none; }
.seg.tabs button { border-radius: 0; }
/* Barras de rolagem finas, como as de sobreposição do macOS. */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.28) transparent; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font: 400 12px var(--font); color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], textarea, select {
  width: 100%; min-height: 42px; padding: 9px 14px; border-radius: var(--radius-btn); border: 1px solid var(--rule);
  background: var(--field); color: var(--ink); font: 400 15px/1.4 var(--font); color-scheme: dark;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
select { border-radius: var(--capsule); padding-left: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, 0.24); }
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(10, 153, 255, 0.28); }
textarea { resize: vertical; min-height: 96px; }
button:focus-visible, a:focus-visible, .drop:focus-visible, summary:focus-visible, svg:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--acc); outline-offset: 2px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--acc-fill); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; flex: none; }
.counter { font: 400 12px var(--font); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--critical); font-weight: 600; }

/* Redes */
.net { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.net-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.net-ico { width: 18px; height: 18px; flex: none; }
.net-ico svg { width: 100%; height: 100%; display: block; }

/* Selos: fundo suave, texto na cor do estado. Verde para alta, vermelho suave para queda. */
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px;
  border: 0; border-radius: var(--capsule); background: var(--surface-3); color: var(--ink-2);
  font: 600 12px/1 var(--font); white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pill.good { background: rgba(48, 209, 88, 0.16); color: var(--good); }
.pill.warning { background: rgba(10, 153, 255, 0.18); color: var(--acc); }
.pill.serious { background: rgba(255, 90, 82, 0.16); color: var(--alert); }
.pill.critical { background: rgba(255, 107, 102, 0.16); color: var(--critical); }
.tag-sample { background: transparent; border: 1px dashed rgba(255, 255, 255, 0.2); color: var(--ink-2); }

/* Avisos: uma linha com filete de 3 px à esquerda. Azul por padrão; "aviso" em vermelho suave. */
.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px 10px 16px; margin-bottom: 20px; border-radius: 16px;
  background: rgba(10, 153, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(10, 153, 255, 0.28); color: var(--ink); font-size: 14px;
}
.banner.aviso { background: rgba(255, 146, 48, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 146, 48, 0.3); }
.banner.aviso > svg { stroke: #ff9230; }
.banner.demo { background: rgba(10, 153, 255, 0.12); }
.banner > span { flex: 1 1 240px; min-width: 0; }
.banner > .btn { margin-left: auto; }
.banner > svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Painel */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sel-auto { width: auto; min-height: 40px; }
.page-head .resumo { font: 400 15px/1.5 var(--font); color: var(--ink-2); margin-top: 4px; max-width: 70ch; }
.sub { font: 400 13px/1.5 var(--font); color: var(--ink-2); margin-top: 4px; }
.painel { display: flex; flex-direction: column; gap: 20px; }
.painel > .banner { margin-bottom: 0; }
.sec-sub { color: var(--ink-2); font-size: 14px; margin: 4px 0 14px; }

.duo { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.duo > .card { min-width: 0; }
.duo-wide { flex: 2 1 520px; }
.duo-narrow { flex: 1 1 300px; }
.duo-half { flex: 1 1 440px; }
.duo-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.duo-col > .card { flex: none; }
.duo-col > .card-grow { flex: 1 1 auto; }

/* Visão geral: a faixa de quatro números é a barra de abas; a aba escolhida ganha fundo e sublinhado azul. */
.ov-card { padding: 0; overflow: hidden; }
.ov-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.ov-strip button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; min-height: 92px;
  padding: 16px 20px; border: 0; background: transparent; color: var(--ink); text-align: left;
  font: inherit; cursor: pointer;
}
.ov-strip button + button { border-left: 1px solid var(--rule); }
.ov-strip button:hover { background: rgba(255, 255, 255, 0.02); }
.ov-strip button[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--acc); }
.ov-lbl { font-size: 13px; color: var(--ink-2); }
.ov-val { font: 700 26px/1.1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ov-delta { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ov-delta.up { color: var(--good); }
.ov-delta.down { color: var(--critical); }
.ov-body { padding: 18px 20px 20px; }
.ov-body > .small { margin-bottom: 4px; }
.ov-chart { margin: 14px 0 6px; }
.ov-empty { margin-top: 14px; }
@media (max-width: 700px) {
  .ov-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-strip button + button { border-left: 0; }
  .ov-strip button:nth-child(even) { border-left: 1px solid var(--rule); }
  .ov-strip button:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .ov-val { font-size: 22px; }
  .ov-strip button { min-height: 0; padding: 14px 16px; }
  .ov-vs { display: none; }
  .ov-body { padding: 16px; }
  /* Filtros: período em toda a largura; rede e atualizar na linha de baixo. */
  .page-head .filters { width: 100%; }
  .page-head .filters .seg { flex: 1 1 100%; display: flex; }
  .page-head .filters .seg button { flex: 1; }
  .page-head .filters .sel-auto { flex: 1; }
}

.legend { display: flex; gap: 8px 18px; flex-wrap: wrap; font: 400 13px/1.4 var(--font); color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.leg-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--acc); }
.leg-band { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.leg-ink { background: var(--ink); }
.leg-dash { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--ink-2); }
.leg-dash-blue { border-top-color: var(--acc); }

/* Tempo real: ganho por hora nas 48 h até a última contagem, em barras azuis. */
.rt-head { display: flex; align-items: center; gap: 8px; }
.rt-when { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--good); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14); }
.rt-sub { font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.rt-total { font: 700 30px/1.15 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rt-bars { display: block; width: 100%; height: 48px; margin-top: 10px; fill: var(--acc); }
.rt-bars .rt-zero { fill: var(--rule-strong); }
.rt-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rt-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.rt-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rt-foot a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Fora da curva: linhas com o quadro à esquerda e o selo à direita. */
.out-list { display: flex; flex-direction: column; }
.out-item {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0;
  border-top: 1px solid var(--grid); text-decoration: none; color: var(--ink);
}
.out-item:first-child { border-top: 0; }
.out-item:hover .out-txt b { text-decoration: underline; text-underline-offset: 3px; }
.out-txt { flex: 1; min-width: 0; }
.out-txt b { display: block; font: 600 14px/1.35 var(--font); overflow-wrap: anywhere; }
.out-txt span { display: block; font: 400 12px/1.4 var(--font); color: var(--ink-2); margin-top: 3px; }
.out-more { border-top: 1px solid var(--grid); padding-top: 10px; }
.out-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.out-more summary:hover { color: var(--ink); }
.out-more[open] summary { margin-bottom: 4px; }
.out-empty { font-size: 14px; color: var(--ink-2); }

/* Contas: uma faixa de cartões baixos, todos da mesma altura; o chip tem a cor da rede. */
.acc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.acc-card {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.acc-badge {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--c); color: var(--ink-c, #fff); font: 700 13px/1 var(--font);
}
.acc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-who .pill { min-height: 20px; font-size: 11px; }
.acc-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.acc-num { font: 700 22px/1.25 var(--font); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.acc-unit { font-size: 13px; color: var(--ink-2); }
.acc-gain { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-gain.up { color: var(--good); }
.acc-gain.down { color: var(--critical); }
/* Sem seguidores, a linha do número vira um aviso da mesma altura. */
.acc-falta { font: 500 14px/1.25 var(--font); color: var(--ink); min-height: 28px; display: flex; align-items: center; }
.acc-falta a { margin-left: 4px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.acc-meta { font-size: 12px; color: var(--muted); }
.acc-invite { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.acc-invite p { margin-top: 4px; }

/* Seu melhor conteúdo: cinco linhas com a miniatura 36 x 56. */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { border-top: 1px solid var(--grid); }
.rank li:first-child { border-top: 0; }
/* Faltou postar: uma linha por vídeo, com um selo por rede (verde = saiu, laranja tracejado = falta). */
.lacunas { margin-bottom: 16px; }
.lac-list { list-style: none; margin: 0; padding: 0; }
.lac-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--grid); }
.lac-item:first-child { border-top: 0; padding-top: 4px; }
.lac-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lac-info > b { font: 600 15px/1.3 var(--font); overflow-wrap: anywhere; }
.lac-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lac-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 10px; border-radius: var(--capsule);
  font: 600 12px/1 var(--font); text-decoration: none; white-space: nowrap;
}
.lac-chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lac-chip.ok { background: rgba(48, 209, 88, 0.16); color: var(--good); }
a.lac-chip.ok:hover { background: rgba(48, 209, 88, 0.26); }
.lac-chip.espera { background: rgba(10, 153, 255, 0.16); color: var(--acc); }
.lac-chip.falta { background: rgba(255, 146, 48, 0.12); color: #ff9230; box-shadow: inset 0 0 0 1px rgba(255, 146, 48, 0.5); }
.lac-acoes { flex: none; display: flex; align-items: center; gap: 4px; }
.lac-nota { margin-top: 10px; border-top: 1px solid var(--grid); padding-top: 12px; }
@media (max-width: 640px) {
  .lac-item { flex-wrap: wrap; align-items: flex-start; }
  .lac-info { flex-basis: calc(100% - 80px); }
  .lac-acoes { width: 100%; justify-content: flex-start; }
}
.rank-item { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 0; color: var(--ink); text-decoration: none; }
.rank-item:hover .rank-txt b { text-decoration: underline; text-underline-offset: 3px; }
.rank-no { flex: none; width: 20px; text-align: right; font: 600 13px var(--font); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-txt b { font: 600 15px/1.3 var(--font); overflow-wrap: anywhere; }
.rank-txt span { font: 400 12px/1.4 var(--font); color: var(--ink-2); }
.rank-num { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.rank-num b { font: 700 15px var(--font); font-variant-numeric: tabular-nums; }
/* No celular o selo desce para baixo do título, e o título fica com a largura toda. */
@media (max-width: 560px) {
  .rank-item {
    display: grid; grid-template-columns: 20px 36px minmax(0, 1fr) auto; gap: 6px 12px; align-items: start;
    grid-template-areas: "no th tx vw" "no th pl pl";
  }
  .rank-no { grid-area: no; align-self: center; }
  .rank-item .vthumb { grid-area: th; align-self: center; }
  .rank-txt { grid-area: tx; }
  .rank-num { display: contents; }
  .rank-num b { grid-area: vw; }
  .rank-num .pill { grid-area: pl; justify-self: start; }
}

/* Melhor dia e horário: azul conforme a mediana; o melhor quadrado tem contorno branco. */
.heat-wrap { overflow-x: auto; margin: 0 -3px; }
table.heat { width: 100%; min-width: 320px; table-layout: fixed; border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.heat th, .heat td { padding: 0; background: none; border: 0; white-space: nowrap; }
.heat thead td:first-child { width: 34px; }
.heat thead th { font: 400 11px var(--font); color: var(--ink-2); text-align: center; padding-bottom: 4px; }
.heat tbody th { text-align: left; font: 500 12px var(--font); color: var(--ink); }
.heat tbody tr:hover { background: none; }
.heat tbody td {
  height: 34px; border-radius: 6px; text-align: center; font: 500 12px var(--font);
  font-variant-numeric: tabular-nums; background: rgba(94, 168, 255, var(--a)); color: var(--ink);
}
.heat tbody td.heat-best { box-shadow: inset 0 0 0 2px #fff; font-weight: 700; border-radius: 6px; }
.heat tbody td.heat-none { background: var(--grid); }
/* Sem vídeos suficientes, a grade só antecipa o que vem: mais baixa e apagada. */
.heat-off tbody td { height: 16px; font-size: 0; border-radius: 3px; }
.heat-off tbody th { font-size: 11px; }
.heat-off { opacity: 0.45; }
.heat-best-txt { margin-top: 12px; font-size: 14px; }
.heat-foot { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* De onde vêm: barra dividida pela parte de cada rede, embaixo do gráfico. */
.share { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.share-lbl { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.share-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.share-bar i { display: block; min-width: 3px; }
.share-list { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.share-list span { display: inline-flex; align-items: center; gap: 7px; }
.share-list b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Quadros de vídeo: 4:5, cantos de 8 px. Sem capa, gradiente escuro com as iniciais no centro. */
.thumb, .vthumb {
  position: relative; display: flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
  width: 44px; aspect-ratio: 4 / 5; height: auto; overflow: hidden;
  border-radius: var(--radius-sm); object-fit: cover; border: 0;
  background: linear-gradient(160deg, #2a2a31, #1b1b1f); color: var(--muted);
  font: 500 13px/1 var(--font); text-align: center;
}
img.thumb, img.vthumb { padding: 0; }
.vthumb-sm, .thumb-sm { width: 40px; }
.vthumb-lg, .thumb-lg { width: 84px; }
.vthumb-rank { width: 36px; height: 56px; aspect-ratio: auto; }

/* Rede por quadrado: chip com a cor da rede e a sigla no texto. */
.net-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.net-chip {
  min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; flex: none;
  display: inline-grid; place-items: center; background: var(--c); color: var(--ink-c, #fff);
  font: 700 11px/1 var(--font);
}

/* Agenda: cada post é um cartão com o quadro à esquerda; as ações são texto. */
.agenda-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.agenda-tools .month { font: 600 18px var(--font); min-width: 170px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cal .dow {
  padding: 9px 8px; font: 500 12px var(--font); color: var(--ink-2);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.cal .day {
  min-height: 116px; padding: 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.cal .day.out { color: var(--muted); }
.cal .day.out .dnum { color: var(--muted); }
.cal .dnum { font: 500 12px var(--font); color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.cal .dnum > span { min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 999px; padding: 0 6px; }
.cal .day.today .dnum > span { background: var(--acc-fill); color: #fff; font-weight: 700; }
.cal .add {
  opacity: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: 500 18px/1 var(--font);
  width: 24px; height: 24px; border-radius: var(--radius-sm);
}
.cal .add:hover { background: rgba(255, 255, 255, 0.06); }
.cal .day:hover .add, .cal .add:focus-visible { opacity: 1; }
.chip {
  display: flex; align-items: center; gap: 5px; width: 100%; padding: 4px 6px; border-radius: 6px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink); font: 500 12px var(--font); text-align: left;
}
.chip:hover { border-color: var(--rule-strong); }
.chip .time { font: 400 11px var(--font); color: var(--ink-2); flex: none; font-variant-numeric: tabular-nums; }
.chip .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chip .dots { display: flex; gap: 2px; flex: none; }
.chip .dots i { width: 7px; height: 7px; border-radius: 2px; }
.chip.failed { border-color: rgba(252, 165, 165, 0.4); color: var(--critical); }
@media (max-width: 860px) {
  .cal .day { min-height: 70px; padding: 4px 2px; }
  .cal .dow { padding: 8px 2px; text-align: center; }
  .chip .title, .chip .time { display: none; }
  .chip { justify-content: center; padding: 4px 2px; }
}

.post-list { display: flex; flex-direction: column; gap: 12px; }
.group-title { font: 600 18px var(--font); margin: 28px 0 12px; display: flex; gap: 10px; align-items: center; }
.group-title .muted {
  min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface-3);
  display: inline-grid; place-items: center; font: 500 12px var(--font); color: var(--ink-2);
}
.post {
  display: flex; gap: 16px; padding: 16px; align-items: flex-start; min-width: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.post .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.post .title-line { font: 600 16px/1.35 var(--font); overflow-wrap: anywhere; }
.post .meta { font: 400 13px/1.4 var(--font); color: var(--ink-2); }
.post .targets { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.target-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.target-line .err { color: var(--critical); font-size: 13px; flex-basis: 100%; padding-left: 26px; }
.target-line .note { color: var(--ink-2); font-size: 13px; flex-basis: 100%; padding-left: 26px; }
.post .actions { display: flex; gap: 4px 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.post .actions .btn {
  min-height: 32px; padding: 0 12px; border-color: transparent; background: none; box-shadow: none; color: var(--acc); font-size: 13px;
}
.post .actions .btn:hover { background: rgba(255, 255, 255, 0.08); }
.post .actions .btn-danger { color: var(--critical); }
.post .actions .btn-danger:hover { background: rgba(255, 107, 102, 0.12); }
@media (max-width: 640px) {
  .post { flex-wrap: wrap; }
  .post .actions { width: 100%; justify-content: flex-start; }
  .vthumb-lg, .thumb-lg { width: 68px; }
}
/* No diálogo o post já está dentro de uma caixa: sem caixa de novo, e as ações descem. */
.post-dlg { border: 0; padding: 0; background: none; }
dialog .post { flex-wrap: wrap; }
dialog .post .actions { width: 100%; justify-content: flex-start; }

/* Diálogo: cartão de superfície com borda sutil; o fundo escurece. */
dialog {
  border: 1px solid var(--rule-strong); border-radius: 26px; padding: 0; background: #2a2a2d; color: var(--ink);
  width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog .d-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
dialog video { width: 100%; max-height: 360px; background: #000; border-radius: var(--radius-sm); }

/* Novo vídeo: zona de envio em cartão tracejado; Agendar no fim do formulário, em branco. */
.editor { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 980px) { .editor { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: var(--radius); padding: 36px 20px; cursor: pointer;
  background: var(--surface); min-height: 300px; color: var(--ink);
}
.drop:hover { border-color: rgba(255, 255, 255, 0.36); }
.drop.over { border-color: var(--acc); background: var(--surface-2); }
.drop strong { font: 600 17px/1.25 var(--font); }
.drop svg { width: 36px; height: 36px; padding: 0; fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.preview video { width: 100%; max-height: 520px; border-radius: var(--radius-sm); background: #000; display: block; }
/* Capa: miniatura 9:16 ao lado do seletor de quadro e do envio de imagem. */
.capa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.capa-corpo { display: flex; gap: 16px; align-items: flex-start; }
.capa-img {
  flex: none; width: 96px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); padding: 6px; text-align: center;
}
.capa-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.capa-ctl { flex: 1; min-width: 0; }
.capa input[type="range"] { width: 100%; accent-color: var(--acc-fill); }
.capa label.btn { cursor: pointer; }
.capa-nota { border-top: 1px solid var(--grid); padding-top: 10px; }
.progress { height: 4px; border-radius: 2px; background: var(--grid); overflow: hidden; }
.progress div { height: 100%; background: var(--acc); width: 0; transition: width 0.2s; }
.checks { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.checks h3 { font: 600 16px var(--font); margin-bottom: 2px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks svg { width: 15px; height: 15px; flex: none; margin-top: 2px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Cartões de rede seguem o cartão padrão; o corpo abre quando a rede está ligada. */
.net-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0 18px; min-width: 0; }
.net-card > label { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 14px 0; cursor: pointer; font-weight: 600; flex-wrap: wrap; }
.net-card:not(.on) > label { color: var(--ink-2); }
.net-card > label input { width: 18px; height: 18px; accent-color: var(--acc-fill); }
.net-card > label .spacer { flex: 1; }
.net-card .net-body { padding: 0 0 18px 28px; display: flex; flex-direction: column; gap: 12px; }
.net-card:not(.on) .net-body { display: none; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: minmax(0, 1fr); } }
.when-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
/* O Agendar fica no fluxo do formulário, sem flutuar por cima do conteúdo. */
.sticky-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 18px 0 4px; border-top: 1px solid var(--rule); margin-top: 6px; }
.form-error { color: var(--alert); font-size: 14px; font-weight: 600; }
.best-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0 4px 12px; border-left: 3px solid var(--acc); font-size: 14px; }
.best-hint > span { flex: 1 1 180px; }
.best-hint > svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Contas (página): um cartão por rede, três na mesma linha no computador. */
.accounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .accounts { grid-template-columns: minmax(0, 1fr); } }
.account { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.account .who { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; min-height: 44px; }
.avatar { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--rule-strong); background: none; object-fit: cover; flex: none; }
.account ol { padding-left: 18px; margin: 4px 0 0; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
code, .code {
  font: 400 13px var(--font); background: var(--field); border: 1px solid var(--rule); color: var(--ink);
  padding: 2px 6px; border-radius: 6px; word-break: break-all;
}
.log { font-size: 14px; max-height: 300px; overflow: auto; }
.log div { padding: 9px 0; border-bottom: 1px solid var(--grid); display: flex; gap: 12px; }
.log div:last-child { border-bottom: 0; }
.log time { color: var(--ink-2); flex: none; font: 400 12px var(--font); font-variant-numeric: tabular-nums; }
.log .error { color: var(--critical); }

/* Assistente de configuração */
.tab-ok { width: 14px; height: 14px; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; }
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.step { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--grid); }
.step:first-child { border-top: 0; padding-top: 4px; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font: 500 13px var(--font); border: 1px solid var(--rule-strong); color: var(--ink); background: none;
}
.step.done .step-num { background: var(--acc-fill); border-color: var(--acc-fill); color: #fff; }
.step.done h3 { color: var(--ink-2); }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-body p { color: var(--ink-2); font-size: 14px; }
.step-final { border-top: 1px solid var(--rule); padding-top: 18px; }
.copy { display: flex; flex-direction: column; gap: 4px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--radius-btn); font-size: 13px; overflow-wrap: anywhere; }
a.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* Avisos flutuantes */
#toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast {
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--rule-strong);
  padding: 12px 16px; border-radius: var(--radius-btn); font-size: 14px; font-weight: 500;
  max-width: 380px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); animation: pop 0.18s ease-out;
}
.toast.error { box-shadow: inset 3px 0 0 var(--alert), 0 8px 24px rgba(0, 0, 0, 0.35); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
@media (max-width: 860px) { #toasts { left: 16px; right: 16px; bottom: 84px; } .toast { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .progress div { transition: none; } }

/* Entrada, primeiro acesso e convite (sem a navegação principal) */
.shell.solo { grid-template-columns: minmax(0, 1fr); }
.shell.solo .nav { display: none; }
.shell.solo main { max-width: 440px; margin: 0 auto; padding: 10vh 16px 64px; }
/* A marca aparece acima do cartão, já que a barra some nessas telas. */
.shell.solo main::before {
  content: 'Palco'; display: flex; align-items: center; height: 30px; padding-left: 36px; margin: 0 0 40px;
  background: url('/icon.svg') no-repeat left center / 26px 26px;
  font: 700 20px/1 var(--font); letter-spacing: -0.02em; color: var(--ink);
}
.auth-card { width: 100%; }
.auth-card.card-pad { padding-top: 22px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-head h1 { font-size: 28px; }
.auth-head p { color: var(--ink-2); }
.auth-card .btn-primary { width: 100%; }

/* Minha conta */
.conta { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.conta .card { min-width: 0; }
.dados { margin: 0; display: flex; flex-direction: column; }
.dados div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.dados div:first-child { padding-top: 0; }
.dados dt, .dados dd { margin: 0; }
.dados dt { font: 400 13px var(--font); color: var(--ink-2); }
.dados dd { font-weight: 600; overflow-wrap: anywhere; text-align: right; }

/* Pessoas (administrador) */
.people { display: flex; flex-direction: column; gap: 16px; }
.person { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.person-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.person-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.person-head p { overflow-wrap: anywhere; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.person-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 18px; margin: 0; font-size: 14px; }
.person-data dt { font: 400 12px var(--font); color: var(--ink-2); }
.person-data dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.person-data .progress { margin-top: 6px; }
.contas-linha { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 14px; }
.contas-linha .conta { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.person-actions { gap: 8px; }
.limite { border-top: 1px solid var(--grid); padding-top: 12px; max-width: 360px; }
.invite-box {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; min-width: 0;
  border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: var(--radius); background: none;
}
.invite-box h3 { font-size: 15px; }
.invite-box .copy-row code { white-space: normal; }
details.redes { border-top: 1px solid var(--rule); padding: 12px 0 0; }
details.redes summary { cursor: pointer; font-size: 15px; font-weight: 600; }
details.redes > div { margin-top: 12px; }
.check-item { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--grid); min-width: 0; }
.check-item:first-child { border-top: 0; padding-top: 0; }
.check-item h3 { font-size: 15px; }
.check-item p { color: var(--ink-2); font-size: 14px; }
.check-item .row { gap: 6px; }
.portfolio-aviso { display: flex; gap: 8px; align-items: flex-start; }
.portfolio-aviso svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.import-box { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--grid); padding-top: 12px; margin-top: 14px; }

/* Todos os vídeos (painel) */
.hist-list { display: flex; flex-direction: column; }
.hist-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--grid); min-width: 0;
}
.hist-item:first-child { border-top: 0; }
.hist-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-info .row { gap: 4px 10px; }
.hist-title { font: 600 15px/1.35 var(--font); overflow-wrap: anywhere; }
.hist-title a { text-decoration: none; }
.hist-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hist-nums { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.hist-nums div { min-width: 0; }
.hist-nums dt { font: 400 12px var(--font); color: var(--ink-2); }
.hist-nums dd { margin: 0; font: 500 15px var(--font); font-variant-numeric: tabular-nums; }
.hist-pager { justify-content: center; margin-top: 18px; }
@media (min-width: 720px) {
  .hist-item { grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px); }
  .hist-nums { grid-column: auto; }
}

/* Tabelas: números alinhados à direita, régua fina entre as linhas. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font: 500 12px var(--font); color: var(--ink-2); padding: 10px 10px 8px;
  border-bottom: 1px solid var(--rule-strong); white-space: nowrap; background: none;
}
td { padding: 12px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-size: 13px; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.vid-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.vid-cell a { text-decoration: none; font-weight: 600; }
.vid-cell a:hover { text-decoration: underline; text-underline-offset: 3px; }
details.data-table summary {
  cursor: pointer; font-size: 14px; color: var(--acc); font-weight: 600; margin-top: 16px;
}
details.data-table .table-wrap { margin-top: 10px; }
details.data-table table { font-size: 13px; }
.vid-table { min-width: 720px; }
.vid-table tbody tr[data-href] { cursor: pointer; }
/* No celular cada vídeo vira um bloco: título em cima, redes e comparação, depois os números com rótulo. */
@media (max-width: 640px) {
  .vid-table { min-width: 0; }
  .vid-table thead { display: none; }
  .vid-table tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center;
    grid-template-areas: "v v" "r c" "n e"; padding: 14px 0; border-bottom: 1px solid var(--grid);
  }
  .vid-table tbody td { padding: 0; border: 0; text-align: left; }
  .vid-table td:first-child { grid-area: v; }
  .vid-table .vid-cell { min-width: 0; }
  .vid-table .vt-nets { grid-area: r; }
  .vid-table .vt-cmp { grid-area: c; text-align: right; }
  .vid-table .vt-views { grid-area: n; }
  .vid-table .vt-eng { grid-area: e; text-align: right; }
  .vid-table .vt-views::before, .vid-table .vt-eng::before {
    content: attr(data-label) ' '; color: var(--ink-2); font: 400 12px var(--font);
  }
}

/* Página do vídeo */
.vid-page { display: flex; flex-direction: column; gap: 20px; }
.vid-page .kpis { margin: 0; }
.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
main > .back-link { margin-bottom: 0; }
.vid-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.vid-head .vthumb-lg { width: 54px; height: 96px; aspect-ratio: auto; border-radius: var(--radius-sm); }
.vid-head-txt { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vid-head-txt h1 { font-size: 26px; overflow-wrap: anywhere; }
.vid-head-txt p { color: var(--ink-2); }
.chart .band { fill: rgba(94, 168, 255, 0.2); }
.chart .median-line { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .video-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .video-dot { fill: var(--ink); }
.chart .retention-line { fill: none; stroke: var(--youtube); stroke-width: 2.5; stroke-linejoin: round; }
.growth-chart { margin-top: 12px; }
.vnets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.vnet { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vnet-head { display: flex; align-items: center; gap: 8px; }
.vnet-head .net-dot { background: var(--c); }
.vnet-head strong { flex: 1; }
.vnet-data { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 14px; }
.vnet-data dt { font: 400 12px var(--font); color: var(--ink-2); }
.vnet-data dd { margin: 0; font: 600 15px var(--font); font-variant-numeric: tabular-nums; }
.vnet-wide { grid-column: 1 / -1; }
.vnet-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: auto;
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
a.vnet-link:hover { color: var(--ink); }
span.vnet-link { color: var(--muted); font-weight: 500; text-decoration: none; }
.vnet-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notes { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .vid-head-txt h1 { font-size: 22px; } }

/* Gráficos */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; touch-action: pan-y; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 400 11px var(--font); font-variant-numeric: tabular-nums; }
.chart .tick-strong { fill: var(--ink); font: 500 12px var(--font); }
/* A legenda já nomeia as linhas; os rótulos no fim se sobrepunham quando os valores ficavam próximos. */
.chart .endlabel { display: none; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .main-line { fill: none; stroke: var(--acc); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
/* "O seu normal": faixa em branco a 8%, com a linha tracejada por cima. */
.chart .prev-band { fill: rgba(255, 255, 255, 0.08); }
.chart .prev-line { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 4 4; }
.chart .area-top { stop-color: var(--acc); stop-opacity: 0.14; }
.chart .area-bottom { stop-color: var(--acc); stop-opacity: 0; }
.chart .dot { fill: var(--surface); stroke: var(--acc); stroke-width: 2; }
/* O pico ganha um ponto azul com o rótulo em destaque. */
.chart .peak { fill: var(--acc); stroke: var(--surface); stroke-width: 2; }
.chart .peak-label { fill: var(--ink); font: 600 11px var(--font); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 160px;
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-btn); padding: 10px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.tooltip .t-title { font: 600 12px var(--font); margin-bottom: 6px; color: var(--ink-2); }
.tooltip .t-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .t-row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tooltip .t-prev span { color: var(--ink-2); }
.tooltip b { font: 600 13px var(--font); font-variant-numeric: tabular-nums; }

/* Relatório (tela do app) */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { min-width: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.kpi .label { font-size: 13px; color: var(--ink-2); }
.kpi .value { font: 700 26px/1.1 var(--font); letter-spacing: -0.02em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; color: var(--ink-2); }
.kpi .delta b { font-weight: 600; }
.kpi .delta .up { color: var(--good); }
.kpi .delta .down { color: var(--critical); }
@media (max-width: 560px) { .kpi .value { font-size: 22px; } }

/* Só para leitores de tela */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Vazio: uma mensagem centralizada dentro do cartão. Vem depois de .card-pad para ganhar o espaçamento. */
.empty { text-align: center; padding: 48px 20px; }
.empty h2 { font-size: 20px; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin-bottom: 18px; }
