:root {
  --lime: #d8f23a;          /* amarelo-limão da marca */
  --lime-strong: #c2dd1f;
  --ink: #15171c;           /* barra preta */
  --bg: #f3f4f6;            /* fundo da página */
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e4e6ea;
  --line-2: #d6d9df;
  --text: #1c1f26;
  --muted: #888e99;
  --green: #2ecc71;
  --danger: #e8484d;
  --accent-2: #2563eb;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; }
button { font-family: inherit; }

/* ---------- Appbar ---------- */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink); color: #fff; padding: 0 20px; height: 54px;
  position: sticky; top: 0; z-index: 20;
}
.appbar-left { display: flex; align-items: center; gap: 14px; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--lime); color: #15171c; font-size: 17px; font-weight: 700;
}
.brand-badge .ob-bot { width: 28px; height: 28px; display: block; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.brand-name small { color: var(--muted); font-weight: 600; font-size: 11px; margin-left: 3px; }
.crumbs { color: #b9bdc6; font-size: 13px; margin-left: 18px; }
.crumbs .sep { margin: 0 8px; color: #6b7079; }
.live { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.live b { color: var(--lime); }
.appbar-right { display: flex; align-items: center; gap: 16px; }
/* Badge do ciclo diário: deixa explícito a que dia os dados se referem */
.cycle-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: var(--lime); border-radius: 999px; padding: 4px 11px;
  white-space: nowrap; cursor: default;
}
.cycle-badge::before { content: "◷"; font-size: 13px; font-weight: 400; opacity: .8; }
.userpick { display: flex; align-items: center; gap: 8px; }
.userpick-label { color: #b9bdc6; font-size: 12px; font-weight: 600; }
#user-select, #topic-select {
  background: #23262d; color: #fff; border: 1px solid #3a3e47; border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  max-width: 200px;
}
#user-select:focus, #topic-select:focus { outline: none; border-color: var(--lime); }
#topic-select optgroup { background: var(--ink); color: var(--lime); font-style: normal; }
#topic-select option { background: #23262d; color: #fff; font-weight: 600; }
.crumbs b { color: #fff; }

/* Contexto de curadoria (movido da appbar p/ dentro da área de curadoria) */
.cur-context {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.cur-context .crumbs { margin-left: 0; color: var(--muted); }
.cur-context .crumbs b { color: var(--text); }
.cur-context .crumbs .sep { color: #c4c8d0; }
.cur-context .userpick-label { color: var(--muted); }
.cur-context #topic-select { background: #fff; color: var(--text); border-color: var(--line); }
.cur-context #topic-select optgroup { background: #fff; color: var(--muted); }
.cur-context #topic-select option { background: #fff; color: var(--text); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 54px); }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 54px; height: calc(100vh - 54px);
  align-self: start; overflow-y: auto;
}
.nav {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: none; border-radius: 9px;
  padding: 11px 13px; font-size: 14px; font-weight: 600; color: #4a4f5a;
  cursor: pointer; text-align: left; transition: .12s; text-decoration: none;
}
.nav .i { width: 18px; text-align: center; color: var(--muted); font-size: 15px; }
.nav:hover { background: var(--surface-2); color: var(--text); }
.nav.is-active { background: var(--lime); color: #15171c; }
.nav.is-active .i { color: #15171c; }
.navcount {
  margin-left: auto; background: rgba(0,0,0,.12); color: inherit;
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
}
.nav:not(.is-active) .navcount { background: var(--line); color: var(--muted); }
.nav-group { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); padding: 4px 13px 3px; }
.nav.sub { padding-left: 26px; }
.nav-divider { height: 1px; background: var(--line); margin: 9px 12px; }

/* Crédito OpinionBotz — Gugga é um produto da OpinionBotz (rodapé da sidebar) */
.ob-credit { margin-top: auto; padding: 18px 12px 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ob-credit .ob-by { font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); }
.ob-credit .ob-logo { height: 46px; width: auto; max-width: 100%; display: block; }

/* ---- Alta Performance (transversal) ---- */
.perf-intro { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.perf-intro p { margin: 0; font-size: 13px; color: #4a4f5a; line-height: 1.5; }
/* Legenda dos ícones + a nota (no lugar do texto de análise) */
.perf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.perf-legend span { font-size: 12px; color: #5a5f6a; white-space: nowrap; }
.perf-legend .perf-legend-nota { margin-left: auto; color: #3a3f49; display: inline-flex; align-items: center; gap: 6px; }
/* "Nota" com o MESMO selo verde da coluna de nota — deixa claro que o quadradinho é a nota */
.perf-nota-badge { background: var(--lime); color: #15171c; font-weight: 800; border-radius: 7px; padding: 2px 8px; }
/* Glossário "Como ler" — escondido por padrão, abre a um clique */
.perf-help-toggle { background: none; border: none; color: var(--accent-2); font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 2px 4px; font-family: inherit; white-space: nowrap; }
.perf-help-toggle:hover { text-decoration: underline; }
.perf-glossary { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #4a4f5a; line-height: 1.5; }
.perf-glossary b { color: #15171c; font-weight: 700; }
/* No Radar o glossário não fica num card — encosta na barra de controles */
.rad-glossary { margin-top: -6px; margin-bottom: 16px; }
.perf-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.perf-controls select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; color: var(--text); cursor: pointer; }
.perf-controls select:focus { outline: none; border-color: var(--lime); }
.perf-count { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-left: auto; }
.perf-list { display: flex; flex-direction: column; gap: 8px; }
.perf-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; overflow: hidden; }
.perf-row:hover { border-color: var(--line-2); }
.perf-rank { flex: 0 0 24px; text-align: center; font-weight: 800; font-size: 15px; color: var(--muted); }
.perf-thumb { flex: 0 0 44px; width: 44px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.perf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.perf-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.perf-author { font-weight: 700; font-size: 13.5px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-author:hover { color: var(--accent-2); text-decoration: underline; }
.perf-cap { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-badge { font-size: 10.5px; font-weight: 700; color: #5a5f6a; background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-metrics { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 9px; font-size: 11px; color: #5a5f6a; }
.perf-metrics span { white-space: nowrap; }
.perf-score { flex: 0 0 auto; min-width: 40px; text-align: center; font-weight: 800; font-size: 17px; color: #15171c; background: var(--lime); border-radius: 10px; padding: 8px 9px; }
@media (max-width: 860px) { .perf-metrics { display: none; } }

/* ---- Radar de Tendências (digest diário) ---- */
.rad-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.rad-controls select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; font-family: inherit; color: var(--text); cursor: pointer; }
.rad-controls select:focus { outline: none; border-color: var(--lime); }
.rad-note { font-size: 12.5px; color: var(--muted); }
.rad-terr { margin-bottom: 26px; }
.rad-terr > h2 { font-size: 19px; color: var(--text); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px solid #15171c; }
.rad-topic { margin: 0 0 18px; }
.rad-topic > h3 { display: inline-block; font-size: 13.5px; color: #15171c; margin: 0 0 9px;
  background: var(--lime); padding: 3px 11px; border-radius: 6px; }
.rad-topic > h3 small { color: #3a3f49; font-weight: 600; }
.rad-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.rad-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rad-rank { background: #15171c; color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.rad-title { font-size: 16px; color: var(--text); flex: 1; min-width: 200px; }
.rad-cat { font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent-2); border-radius: 20px; padding: 2px 10px; }
.rad-acion { font-size: 12px; font-weight: 700; border-radius: 20px; padding: 2px 10px; }
.rad-acion.on { background: rgba(46,204,113,.12); color: #1e9e57; }
.rad-acion.off { background: rgba(232,72,77,.1); color: var(--danger); }
.rad-tags { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.rad-resumo { font-size: 14px; color: #2a2c30; line-height: 1.5; margin-bottom: 8px; }
.rad-insight { font-size: 13.5px; color: #2a2c30; line-height: 1.5; background: var(--surface-2);
  border-left: 3px solid var(--lime); border-radius: 6px; padding: 8px 11px; margin-bottom: 8px; }
.rad-metrics { font-size: 13px; font-weight: 600; color: #3a3f49; margin-bottom: 8px; }
.rad-posts { display: flex; gap: 8px; flex-wrap: wrap; }
.rad-th { width: 46px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; transition: transform .1s ease; }
.rad-th:hover { transform: scale(1.06); }
.rad-th img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Radar 2.0 (tendências reclusterizadas) ---- */
.navbeta { font-size: 8.5px; font-weight: 700; color: inherit; opacity: .5;
  background: transparent; border: 1px solid currentColor; border-radius: 999px;
  padding: 0 5px; margin-left: 6px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.r2-intro { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.r2-stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #3a3f49; }
.r2-stats b { font-size: 17px; color: #15171c; }
.r2-h { font-size: 18px; color: var(--text); margin: 22px 0 12px; }
.r2-h small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.r2-tend { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.r2-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.r2-rank { background: #15171c; color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.r2-icon { font-size: 16px; }
.r2-nome { font-size: 16px; color: var(--text); flex: 1; min-width: 180px; }
.r2-nat { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); border-radius: 20px; padding: 2px 9px; }
.r2-forca { font-size: 12px; font-weight: 700; color: #15171c; background: var(--lime); border-radius: 20px; padding: 2px 10px; }
.r2-resumo { font-size: 14px; color: #2a2c30; line-height: 1.5; margin-bottom: 6px; }
.r2-evid { font-size: 12.5px; color: #5a5f6a; font-style: italic; line-height: 1.45; margin-bottom: 10px; }
.r2-posts, .r2-dest { display: flex; gap: 8px; flex-wrap: wrap; }
.r2-th { position: relative; width: 64px; height: 84px; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center; cursor: pointer; transition: transform .1s ease; text-decoration: none; }
.r2-th:hover { transform: scale(1.05); }
.r2-th img { width: 100%; height: 100%; object-fit: cover; }
.r2-th-a { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); padding: 8px 3px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Conteúdo ---------- */
.content { padding: 24px 30px 60px; max-width: 1280px; }
.content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.content-head h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.muted { color: var(--muted); }
.content-head .muted { margin: 4px 0 0; font-size: 13px; }

/* Barra de apoio de DEMO — visualmente distinta do produto (tracejado, discreto) */
.demo-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 8px 12px;
  border: 1px dashed var(--line); border-radius: 10px; background: transparent;
}
.demo-bar .demo-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: #f0f1f3; color: #6b7280;
}
.demo-bar .demo-btn {
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.demo-bar .demo-btn:hover { border-color: var(--ink); }
.demo-bar .demo-btn-ghost { color: var(--muted); }
.demo-bar .demo-note { font-size: 11px; color: var(--muted); margin-left: auto; }
.btn-yellow {
  background: var(--lime); border: 1px solid var(--lime-strong); color: #15171c;
  font-weight: 700; padding: 10px 16px; border-radius: 9px; cursor: pointer; transition: .12s;
}
.btn-yellow:hover { background: var(--lime-strong); }

/* sub-abas */
.subtabs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 0; margin-bottom: 16px;
}
.subtab {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 10px 4px; margin-right: 14px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.subtab:hover { color: var(--text); }
.subtab.is-active { color: #15171c; border-bottom-color: #15171c; }
.subtab .badge { background: #15171c; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.subtab:not(.is-active) .badge { background: var(--line); color: var(--muted); }
.search-wrap { margin-left: auto; display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }
#search {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  padding: 8px 13px; border-radius: 8px; font-size: 13px; width: 230px;
}
#search:focus { outline: none; border-color: #15171c; }
.btn-ok { background: #15171c; color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.fonte-select {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  padding: 8px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.fonte-select:focus { outline: none; border-color: #15171c; }

/* chips de filtro */
.chips-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.chips-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.mine-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #4a4f5a; cursor: pointer; }
.mine-toggle input { accent-color: #15171c; cursor: pointer; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--surface); border: 1px solid var(--line-2); color: #4a4f5a;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .12s;
}
.chip:hover { border-color: #15171c; color: #15171c; }
.chip.is-active { background: #15171c; border-color: #15171c; color: #fff; }
.chip.clear { background: var(--lime); border-color: var(--lime-strong); color: #15171c; }

/* ---------- Faixa de coleta (proveniência) ---------- */
.collect-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--ink); color: #e9ebef; border-radius: var(--radius);
  padding: 11px 16px; margin-bottom: 18px; font-size: 13px;
}
.collect-banner[hidden] { display: none; }
.collect-banner .cb-bot {
  background: var(--lime); color: #15171c; font-weight: 800; font-size: 12px;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.collect-banner .cb-bot.cb-ws { background: var(--green); color: #fff; }
.collect-banner .cb-info { color: #c3c7cf; }
.collect-banner .cb-info b { color: #fff; }
.collect-banner .cb-q { margin-left: auto; color: var(--lime); font-weight: 600; }
.collect-banner .cb-q b { color: var(--lime); }
.collect-banner .cb-live { font-weight: 600; }
.collect-banner .cb-live-load { color: #c3c7cf; opacity: .8; }
.collect-banner .cb-live-off { color: #ffb020; }

/* ---------- Feed ---------- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 18px; }
@media (max-width: 980px){ .feed { grid-template-columns: 1fr; } }

.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .12s, border-color .12s;
}
.pcard:hover { box-shadow: 0 6px 22px rgba(20,23,28,.07); border-color: var(--line-2); }
.pcard.is-priority { border-left: 3px solid var(--lime); }

.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.status {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: #5a5f6a; border: 1px solid var(--line);
}
.status.curado { background: rgba(46,204,113,.12); color: #1e9e57; border-color: rgba(46,204,113,.3); }
.status.curado::before { content: "● "; }
.status.review { background: rgba(217,156,28,.14); color: #b27d10; border-color: rgba(217,156,28,.35); }
.status.review::before { content: "⟳ "; }
.status.ok { background: rgba(37,99,235,.1); color: var(--accent-2); border-color: rgba(37,99,235,.3); }
.status.by { background: var(--surface-2); color: var(--muted); border-color: var(--line); font-weight: 600; }
.status.report { background: rgba(232,72,77,.1); color: var(--danger); border-color: rgba(232,72,77,.3); }
.status.manual { background: rgba(37,99,235,.1); color: var(--accent-2); border-color: rgba(37,99,235,.3); }
.status.pending { background: rgba(217,156,28,.14); color: #b27d10; border-color: rgba(217,156,28,.35); }
.status.priority { background: var(--lime); color: #15171c; border-color: var(--lime-strong); }
.status.tipo { background: rgba(37,99,235,.08); color: var(--accent-2); border-color: rgba(37,99,235,.25); }
.status.ap { background: #15171c; color: var(--lime); border-color: #15171c; }

/* Modal de curadoria: toggle alta performance + botão ✨ Gerar nas anotações */
.ap-row { display: flex; align-items: center; gap: 9px; flex-direction: row !important; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ap-row input { width: 17px; height: 17px; accent-color: var(--lime-strong); cursor: pointer; margin: 0; }
.ap-row span { font-size: 13.5px; }
.ap-note { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-left: 8px; }
/* legenda dos campos em UMA linha (texto + * / (opcional)) — sem o "ponto vermelho" solto */
.modal-body label .cap { display: flex; align-items: baseline; gap: 6px; }
/* Sugerir (preenche marca + anotação a partir do post) */
.ai-suggest { display: flex; align-items: center; gap: 11px; }
.ai-suggest-btn { flex: none; background: #15171c; color: var(--lime); border: none; border-radius: 8px;
  padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ai-suggest-btn:hover { background: #000; }
.ai-suggest-btn:disabled { opacity: .6; cursor: default; }
.ai-suggest-hint { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ai-suggest-hint b { color: var(--text); font-weight: 700; }
.status.marca { background: #15171c; color: #fff; border-color: #15171c; }
.pcard-acts { display: flex; gap: 2px; }
.act {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: none;
  color: var(--muted); cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: .12s;
}
.act:hover { background: var(--surface-2); color: var(--text); }
.act.save:hover { color: var(--green); }
.act.discard:hover { color: var(--danger); }
.act.is-on { color: var(--lime-strong); }
.act.approve {
  width: auto; padding: 0 12px; gap: 5px; background: var(--green); color: #fff;
  font-weight: 700; font-size: 14px;
}
.act.approve:hover { background: #25a85b; color: #fff; }

.pcard-main { display: flex; gap: 14px; }
.pcard-thumb {
  position: relative; flex: none; width: 96px; aspect-ratio: 9/14;
  border-radius: 10px; overflow: hidden; background: #000; display: block;
}
.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-thumb .thumb-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center; color: #6b7079; font-size: 22px;
  background: var(--surface-2);
}
.pcard-thumb .thumb-ph small { font-size: 10px; }
.pcard-thumb .views {
  position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.pcard-thumb .plat {
  position: absolute; top: 6px; left: 6px; background: var(--lime); color: #15171c;
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; z-index: 1;
}
.pcard-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pcard-author { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--lime), #9fbf1a); color: #15171c;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.pcard-author b { font-size: 14px; }
.pcard-author .handle { color: var(--muted); font-size: 12.5px; }
.pcard-meta { font-size: 11.5px; color: var(--muted); }
.pcard-caption { margin: 0; font-size: 13px; color: #3a3f49; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pcard-metrics { display: flex; gap: 18px; padding: 8px 0; border-top: 1px solid var(--line); }
.metric { display: flex; align-items: baseline; gap: 5px; }
.metric .v { font-size: 14px; font-weight: 700; }
.metric .k { font-size: 11px; color: var(--muted); }

.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; color: #4a4f5a; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 6px; }

.pcard-note {
  background: var(--surface-2); border-left: 3px solid var(--lime); border-radius: 8px;
  padding: 9px 11px; font-size: 12.5px; color: #3a3f49; white-space: pre-wrap;
}
.pcard-note.empty { color: var(--muted); font-style: italic; }
.pcard-stamp { font-size: 11.5px; color: var(--muted); }
.pcard-stamp b { color: #3a3f49; font-weight: 700; }
.pcard-class { font-size: 11.5px; color: #5a5f6a; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard-class b { color: #3a3f49; }
.pcard-class .ctx { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }

/* Modo "todos os tópicos": cabeçalho de grupo por tópico dentro do feed */
.feed-group-head { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: #5a5f6a;
  letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid var(--line);
  padding: 8px 2px 5px; margin-top: 6px; }

/* Modal: classificação editável (Território ▸ Tópico), junto do Tipo de Expressão.
   Empilhados em largura total — os nomes de tópico são longos e cortariam lado a lado. */
.class-edit { display: flex; flex-direction: column; gap: 8px; }
.class-edit select { width: 100%; min-width: 0; }
.open-link { font-size: 12px; font-weight: 700; color: var(--accent-2); text-decoration: none; }
.open-link:hover { text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 15px; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.accent { background: var(--lime); border-color: var(--lime-strong); }
.dash-wide { grid-column: 1 / -1; }
.dash-wide h3 { margin: 0 0 12px; font-size: 15px; }
.toplist { display: flex; flex-wrap: wrap; gap: 8px; }
.toplist .tag { font-size: 13px; padding: 5px 11px; }
.toplist .tag b { color: #15171c; }
.dash-wide h3 small { color: var(--muted); font-weight: 600; font-size: 12px; }
/* medidores (donut) */
.gaugecard { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gauge-wrap { position: relative; width: 104px; height: 104px; }
.gauge-wrap svg { width: 104px; height: 104px; }
.g-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.g-fg { fill: none; stroke: var(--lime-strong); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.g-val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--text); }
.gaugecard .l { font-size: 12.5px; }
/* barras horizontais */
.bars { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-lbl { color: #4a4f5a; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--lime-strong); border-radius: 999px; transition: width .5s ease; }
.bar-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-val small { color: var(--muted); font-weight: 600; }
/* funil / barras empilhadas */
.stack { display: flex; height: 20px; border-radius: 999px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); margin: 10px 0; }
.seg { display: block; height: 100%; transition: width .5s ease; }
.s-cur { background: var(--green); } .s-desc { background: var(--danger); } .s-pend { background: var(--line-2); }
.s-bot { background: var(--accent-2); } .s-man { background: var(--lime-strong); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #4a4f5a; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.dash-period { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 13px; color: #3a3f49; }
.soon-card p { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.soon { font-size: 11px; font-weight: 800; background: rgba(217,156,28,.16); color: #b27d10;
  border: 1px solid rgba(217,156,28,.35); padding: 2px 8px; border-radius: 999px; margin-left: 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,23,28,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 480px; background: var(--surface);
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.icon-btn:hover { color: var(--text); }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 15px; }
.modal-context { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.modal-body label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; }
.modal-body label .opt { color: var(--muted); font-weight: 500; }
.modal-body label .req { color: var(--danger); }
.class-hint { margin: 7px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.class-hint b { font-weight: 700; color: #3a3f49; }
.modal-body select#tipo {
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.modal-body select#tipo:focus { outline: none; border-color: #15171c; }
.marca-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.marca-chip {
  background: var(--surface-2); border: 1px solid var(--line-2); color: #4a4f5a;
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .12s;
}
.marca-chip:hover { border-color: #15171c; color: #15171c; }
.marca-chip.is-on { background: #15171c; border-color: #15171c; color: #fff; }
.modal-body textarea, .modal-body input[type=text], .tagfield {
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 13.5px; font-family: inherit;
}
.modal-body textarea:focus, .modal-body input[type=text]:focus { outline: none; border-color: #15171c; }
.tagfield { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.taglist { display: flex; flex-wrap: wrap; gap: 6px; }
.taglist .tag { display: inline-flex; align-items: center; gap: 6px; }
.taglist .tag button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 12px; line-height: 1; }
#tag-input { flex: 1; min-width: 100px; background: none; border: none; color: var(--text); font-size: 13.5px; }
#tag-input:focus { outline: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 10px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: .12s; }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.primary { background: var(--lime); border-color: var(--lime-strong); color: #15171c; }
.btn.primary:hover { background: var(--lime-strong); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #15171c; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13.5px;
  display: flex; align-items: center; gap: 14px; z-index: 60; box-shadow: 0 12px 34px rgba(0,0,0,.3); }
.toast[hidden] { display: none; }
.toast button { background: none; border: none; color: var(--lime); font-weight: 700; cursor: pointer; font-size: 13.5px; }
.perf-loading { padding: 40px 4px; font-size: 15px; color: var(--muted); }
