/* Plataforma Spartans Digital — identidade: preto + dourado (mesma do painel de tráfego) */
:root {
  --bg: #0a0a0b; --side: #0f0f11; --panel: #141416; --panel-2: #1c1c1f; --panel-3: #232327;
  --line: #2a2a2e; --line-2: #34343a;
  --ink: #f3efe6; --ink-2: #bdb6a7; --muted: #837d71;
  --gold: #c9a85c; --gold-hi: #e8d29a; --gold-lo: #7d6631; --gold-wash: rgba(201,168,92,.14);
  --good: #62cf8c; --good-bg: rgba(98,207,140,.13); --bad: #ef7d70; --bad-bg: rgba(239,125,112,.13); --warn: #f0c062; --warn-bg: rgba(240,192,98,.13);
  --r: 12px; --r-sm: 8px;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --sombra: 0 12px 40px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 14px; }
body { -webkit-font-smoothing: antialiased; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; }
::selection { background: var(--gold-wash); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
.muted { color: var(--muted); } .ink2 { color: var(--ink-2); } .gold { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.brand img { width: 30px; height: 36px; object-fit: contain; }
.brand b { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; display: block; }
.brand small { color: var(--gold); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.nav { flex: 1; overflow: auto; padding: 10px 10px 20px; }
.nav-titulo { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2); cursor: pointer; user-select: none; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: var(--panel-2); color: var(--ink); text-decoration: none; }
.nav-item.ativo { background: var(--gold-wash); color: var(--gold-hi); }
.nav-item .ic { flex: none; opacity: .9; }
.nav-item .seta { margin-left: auto; transition: transform .15s; opacity: .6; }
.nav-item .seta.aberta { transform: rotate(90deg); }
.nav-espaco-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; color: #0a0a0b; }
.nav-sub { padding-left: 14px; margin-left: 10px; border-left: 1px solid var(--line); }
.nav-pasta { font-size: 12.5px; color: var(--muted); padding: 6px 10px 2px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.nav-lista { font-size: 13px; padding: 5px 10px; }
.nav-lista .modulo { margin-left: auto; font-size: 9.5px; color: var(--gold); border: 1px solid var(--gold-lo); border-radius: 4px; padding: 0 4px; }
.side-rodape { border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topo { height: 58px; flex: none; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 22px; background: rgba(10,10,11,.85); backdrop-filter: blur(8px); }
.migalha { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.migalha b { color: var(--ink); font-weight: 600; }
.busca { margin-left: auto; position: relative; width: 300px; max-width: 40vw; }
.busca input { width: 100%; padding-left: 32px; }
.busca .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.busca-res { position: absolute; top: 40px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sombra); z-index: 40; max-height: 360px; overflow: auto; padding: 6px; }
.busca-res .nav-item { font-size: 13px; }
.conteudo { flex: 1; overflow: auto; padding: 24px 26px 60px; }
.cabeca { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.cabeca .grow p { margin: 4px 0 0; color: var(--muted); }
.btn.menu-mobile { display: none; }

/* ---------- componentes ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); cursor: pointer; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: var(--gold-lo); }
.btn.primario { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #15120a; border-color: transparent; font-weight: 600; }
.btn.primario:hover { filter: brightness(1.05); }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.fantasma:hover { background: var(--panel-2); color: var(--ink); }
.btn.perigo { color: var(--bad); }
.btn.peq { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); height: 34px; padding: 0 10px; outline: none; width: 100%; }
textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); padding: 0; }
input[type=color] { padding: 2px; width: 44px; }
select option { background: var(--panel); }
label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); }
label.campo > span { font-weight: 500; }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.campos .largo { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.click { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.click:hover { border-color: var(--gold-lo); }
.card h3 { margin-bottom: 10px; }
.grade { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold); opacity: .7; }
.kpi small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.kpi b { display: block; font-family: var(--font-display); font-size: 24px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; text-transform: lowercase; border: 1px solid transparent; }
.pill .ponto { width: 7px; height: 7px; border-radius: 50%; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; background: var(--panel-3); color: var(--ink-2); }
.tag.ouro { background: var(--gold-wash); color: var(--gold-hi); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #111; flex: none; }
.avatar.g { width: 34px; height: 34px; font-size: 12px; }
.prior { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }

.tabela-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); position: sticky; top: 0; z-index: 1; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover td { background: var(--panel-2); }
td.dir, th.dir { text-align: right; }

.grupo-cab { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.grupo-cab .cont { color: var(--muted); font-size: 12px; }

.quadro { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.coluna { flex: 0 0 272px; background: var(--side); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.coluna.alvo { border-color: var(--gold); }
.coluna-cab { padding: 11px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.coluna-corpo { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 50px; }
.cartao { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; }
.cartao:hover { border-color: var(--gold-lo); }
.cartao.arrastando { opacity: .4; }
.cartao .t { font-weight: 500; line-height: 1.35; }

.tarefa-linha { display: grid; grid-template-columns: 22px minmax(0,1fr) 150px 120px 96px 30px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tarefa-linha:hover { background: var(--panel-2); }
.tarefa-linha.feita .t { color: var(--muted); text-decoration: line-through; }
.tarefa-lista { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bolinha { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; cursor: pointer; }
.bolinha.ok { background: var(--good); border-color: var(--good); color: #0a0a0b; }
.nova-linha { display: flex; gap: 8px; padding: 8px 12px; }
.nova-linha input { background: transparent; border-color: transparent; }
.nova-linha input:focus { background: var(--panel-2); }
.atrasada { color: var(--bad); } .hoje { color: var(--warn); }

.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.aba { padding: 9px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.aba:hover { color: var(--ink); }
.aba.ativa { color: var(--gold-hi); border-bottom-color: var(--gold); }
.segmentado { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 2px; }
.segmentado button { border: 0; background: none; padding: 0 11px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.segmentado button.on { background: var(--panel-3); color: var(--gold-hi); }

.barra { height: 7px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.barra > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); border-radius: 99px; }

/* modal e gaveta */
.fundo { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto; animation: aparece .15s; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 620px; box-shadow: var(--sombra); }
.modal.largo { max-width: 860px; }
.modal-cab { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-corpo { padding: 18px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.gaveta-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 45; animation: aparece .15s; }
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 46; display: flex; flex-direction: column; box-shadow: var(--sombra); animation: entra .18s ease-out; }
.gaveta-corpo { flex: 1; overflow: auto; padding: 18px 22px 40px; }
.titulo-edit { font-family: var(--font-display); font-size: 20px; font-weight: 600; background: transparent; border-color: transparent; height: auto; padding: 4px 6px; margin-left: -6px; }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; align-items: center; margin: 16px 0 20px; }
.props > span { color: var(--muted); font-size: 12.5px; }
.props select, .props input { height: 30px; }
.comentario { background: var(--panel-2); border-radius: 10px; padding: 9px 12px; }
.comentario small { color: var(--muted); }
@keyframes aparece { from { opacity: 0; } }
@keyframes entra { from { transform: translateX(30px); opacity: 0; } }

.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 10px; box-shadow: var(--sombra); max-width: 360px; animation: entra .2s; }
.toast.erro { border-left-color: var(--bad); }
.vazio { text-align: center; color: var(--muted); padding: 34px 10px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.carregando { color: var(--muted); padding: 30px; text-align: center; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(800px 400px at 50% -10%, rgba(201,168,92,.16), transparent 70%), var(--bg); }
.login-caixa { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--sombra); }
.login-caixa img { width: 58px; display: block; margin: 0 auto 14px; }
.login-caixa h1 { text-align: center; }
.login-caixa p { text-align: center; color: var(--muted); margin: 6px 0 22px; }

/* gráfico */
.grafico svg { width: 100%; height: 220px; display: block; }
.grafico .eixo { fill: var(--muted); font-size: 10px; }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
pre.msg { white-space: pre-wrap; font-family: var(--font-body); background: var(--panel-2); border-radius: 10px; padding: 12px; margin: 8px 0 0; font-size: 13px; line-height: 1.5; max-height: 420px; overflow: auto; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .side.aberto { transform: none; box-shadow: var(--sombra); }
  .btn.menu-mobile { display: inline-flex; }
  .topo { padding: 0 14px; } .conteudo { padding: 18px 16px 60px; }
  .busca { width: auto; flex: 1; max-width: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .campos { grid-template-columns: 1fr; }
  .tarefa-linha { grid-template-columns: 22px minmax(0,1fr) 90px; }
  .tarefa-linha .so-largo { display: none; }
  .props { grid-template-columns: 1fr; }
}

/* ---------- apresentação da análise (tela e PDF) ---------- */
.apresentacao { position: fixed; inset: 0; z-index: 90; background: #050506; display: flex; flex-direction: column; }
.apres-barra { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.apres-palco { flex: 1; display: grid; place-items: center; padding: 18px; overflow: auto; }
.apres-nav { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px; border-top: 1px solid var(--line); }
.slide { width: min(1100px, 100%); aspect-ratio: 16 / 9; background: radial-gradient(700px 300px at 100% 0, rgba(201,168,92,.12), transparent 70%), var(--panel);
  border: 1px solid var(--line-2); border-radius: 18px; padding: 34px 42px; display: flex; flex-direction: column; overflow: hidden; }
.slide-topo { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.slide-topo img { width: 22px; }
.slide h2 { font-size: 26px; color: var(--ink); }
.slide-sub { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.slide-corpo { flex: 1; display: grid; gap: 18px; margin-top: 20px; align-content: start; min-height: 0; }
.slide-corpo.duplo { grid-template-columns: 1fr 1fr; }
.slide-bloco { min-width: 0; }
.slide-capa { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.slide-capa small { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.slide-capa h1 { font-size: 44px; line-height: 1.1; }
.slide-capa p { color: var(--ink-2); font-size: 17px; margin: 0; max-width: 760px; }
.slide-geral { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.slide-geral b { font-family: var(--font-display); font-size: 54px; color: var(--gold-hi); }
.slide-geral span { color: var(--ink-2); max-width: 220px; }
.slide-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.slide-kpi { background: var(--panel-2); border-radius: 12px; padding: 14px; border-left: 3px solid var(--gold); }
.slide-kpi small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.slide-kpi b { display: block; font-family: var(--font-display); font-size: 24px; margin: 4px 0 2px; }
.slide-kpi span { font-size: 12px; color: var(--ink-2); }
.slide-texto { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0; white-space: pre-wrap; }
.slide-lista h4 { margin: 0 0 8px; font-size: 14px; }
.slide-lista ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.slide-lista li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.slide-lista .marca { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; }
.slide-nota { display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); padding: 14px; border-radius: 12px; }
.slide-tabela { font-size: 13px; }
.slide-tabela th { position: static; background: transparent; }
.slide-fontes { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.impressao { display: none; }
/* janela do PDF: um slide por página */
body.pdf { background: #0a0a0b; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body.pdf .slide { width: 297mm; height: 210mm; aspect-ratio: auto; border-radius: 0; border: 0; margin: 0 auto; page-break-after: always; break-after: page; }
@media print { @page { size: A4 landscape; margin: 0; } }

/* ---------- criativos de referência ---------- */
.criativos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.criativo { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.criativo-midia { background: #000; height: 420px; position: relative; overflow: hidden; display: grid; place-items: center; }
.criativo-midia video, .criativo-midia img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.criativo-info { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.criativo-info .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.selo { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--gold-wash); color: var(--gold-hi); }
.slide-corpo.duplo .slide-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
