/* Painel dos sócios — layout de computador primeiro, tema claro/escuro pelo sistema. */
:root {
  /* 01/11/2026 (dono escolheu o estilo A): escuro e dourado, a mesma cara do jogo — sempre, de dia e de noite. */
  color-scheme: dark;
  --bg: #17110b;
  --surface: #241a10;
  --surface-2: #2f2316;
  --border: #4d3820;
  --text: #f3e6c8;
  --text-2: #d2bf98;
  --muted: #a8956f;
  --accent: #e0aa45;
  --accent-ink: #1d1309;
  --gold-hi: #ffd77a;
  --grid: #3a2b1a;
  --series-1: #e6b24a;
  --series-2: #6fb6ff;
  --series-3: #79d27a;
  --series-4: #e87d5a;
  --good: #79d27a;
  --warn: #f0b43c;
  --bad: #ff7a6a;
  --good-bg: #1f3320;
  --warn-bg: #3a2c12;
  --bad-bg: #3d1a16;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 10vh auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.login h1 { margin: 0 0 4px; font-size: 20px; }
.login p { color: var(--text-2); margin: 0 0 18px; }
.login label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 13px; }
.login label.remember { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 400; cursor: pointer; }
.login input { width: 100%; }
.login label.remember input { width: auto; margin: 0; }
.socialrow { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.socialrow:empty { display: none; }
.btn.social { display: block; text-align: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.btn.social:hover { background: var(--warn-bg); }
.qr { display: block; width: 220px; height: 220px; margin: 4px auto 14px; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.secret { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 8px 10px; border-radius: 6px; word-break: break-all; user-select: all; }

/* ---------- casca ---------- */
/* 22/10/2026: barra de jogos no topo (painel integrado). */
:root { --bar-h: 48px; }
.gamebar { position: sticky; top: 0; z-index: 20; height: var(--bar-h); display: flex; align-items: center; gap: 18px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.gamebar .brand { font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--text-2); }
.gamebar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; min-width: 0; }
.gamebar nav a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 13px; border: 1px solid transparent; }
.gamebar nav a:hover { background: var(--surface-2); }
.gamebar nav a.on { background: var(--accent); color: var(--accent-ink); }
.gamebar nav a.off:not(.on) { color: var(--muted); }
.gamebar .soon { font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.gamebar nav a.on .soon { background: rgba(0, 0, 0, 0.15); color: inherit; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--bar-h)); }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 10px; position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; }
.side .side-note { font-size: 12px; color: var(--text-2); margin: 0 8px 14px; }
.side h1 { font-size: 15px; margin: 0 8px 2px; }
.side .who { font-size: 12px; color: var(--muted); margin: 0 8px 14px; word-break: break-all; }
.side nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 7px; color: var(--text); text-decoration: none; margin-bottom: 1px; }
.side nav a:hover { background: var(--surface-2); }
.side nav a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* Bolinha vermelha com o número do que é novo (30/10/2026). */
.side .pill { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; margin-left: 8px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #e5383b; color: #fff; font-size: 11px; font-weight: 700; text-align: center; vertical-align: middle; box-shadow: 0 0 0 2px rgba(229, 56, 59, 0.25); }
.side .foot { margin-top: 16px; padding: 0 8px; display: grid; gap: 6px; }
main { padding: 22px 28px 60px; min-width: 0; }
.head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: 22px; }
.head .sub { color: var(--muted); font-size: 12px; }
.head .grow { flex: 1; }

/* ---------- blocos ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Online agora (05/10/2026): rótulo + valor em cada linha do cartão do jogador. */
.kv { display: flex; gap: 10px; padding: 3px 0; border-top: 1px solid var(--surface-2); font-size: 13px; }
.kv .k { flex: 0 0 120px; color: var(--text-2); }
.kv .v { flex: 1; min-width: 0; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--text-2); }
.tile .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .n { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .desc { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.note { font-size: 12px; color: var(--muted); }
.warnbox { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.errbox { background: var(--bad-bg); border: 1px solid var(--bad); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.okbox { background: var(--good-bg); border: 1px solid var(--good); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }

/* ---------- tabelas ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
td.r, th.r { text-align: right; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.empty { color: var(--muted); padding: 10px 0; font-size: 13px; }

/* ---------- selos ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- formulários ---------- */
input, select, textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: 0.5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.form label { display: grid; gap: 3px; font-size: 12px; color: var(--text-2); }
.form .wide { grid-column: span 2; }
.form .full { grid-column: 1 / -1; }

/* ---------- conversa do chamado ---------- */
.msgs { display: grid; gap: 8px; margin: 10px 0; }
.msg { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; max-width: 80%; white-space: pre-wrap; word-break: break-word; }
.msg.staff { margin-left: auto; background: var(--surface-2); }
.msg.internal { border-style: dashed; background: var(--warn-bg); }
.msg .meta { font-size: 11px; color: var(--muted); margin-bottom: 3px; white-space: normal; }
/* 29/09: imagens anexadas pelo jogador (miniatura → clique abre grande). */
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; white-space: normal; }
.thumb { width: 96px; height: 96px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:disabled { cursor: default; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 4px; background: #fff; }
.lightbox-close { color: #fff; font-weight: 700; font-size: 14px; }
pre.json { background: var(--surface-2); padding: 8px 10px; border-radius: 6px; font-size: 12px; overflow-x: auto; margin: 0; max-height: 260px; }

/* ---------- gráficos ---------- */
.chart { width: 100%; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin: 2px 0 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); white-space: pre; font-variant-numeric: tabular-nums; }

/* ---------- painel integrado: cartões genéricos ---------- */
.infobox { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); display: grid; gap: 2px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 10px; }
.hubnums { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hubnums .card { margin-bottom: 0; }
.hubnum-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hubnum .bignum { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.hubnum.st-warn { border-color: var(--warn); }
.hubnum.st-bad { border-color: var(--bad); background: var(--bad-bg); }
.card h3 .badge { margin-left: 8px; vertical-align: 2px; }
.hbars { display: grid; gap: 6px; }
.hb-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbars.funnel .hb-row { grid-template-columns: minmax(110px, 30%) 1fr 56px 110px; }
.hb-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.hbars.funnel .hb-track i { background: var(--series-3); }
.hb-val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.hb-pct { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hb-pct .drop { color: var(--bad); }
.emptystate { text-align: center; padding: 40px 24px; max-width: 640px; margin: 20px auto; }
.emptystate h3 { font-size: 20px; margin: 14px 0 6px; }
.emptystate .es-ring { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 6px solid var(--surface-2); border-top-color: var(--accent); }
.emptystate .es-reason { color: var(--text-2); margin: 0 auto 16px; max-width: 460px; }
.emptystate .es-todo { text-align: left; background: var(--surface-2); border-radius: 8px; padding: 10px 14px; margin: 0 auto 12px; max-width: 520px; }
.emptystate .es-todo .k { font-size: 12px; font-weight: 700; color: var(--text-2); }
.emptystate ol { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }

@media (max-width: 900px) {
  .gamebar { gap: 10px; padding: 0 10px; }
  .gamebar .brand { display: none; }
  .hbars.funnel .hb-row { grid-template-columns: 1fr 1fr 48px; }
  .hbars.funnel .hb-pct { grid-column: 1 / -1; text-align: right; margin-top: -4px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr 1fr; }
  main { padding: 16px; }
}

/* ======================================================================
   Tema A — escuro e dourado (01/11/2026, dono: "painel feio e nada atrativo, complicado de entender").
   Por cima das regras de cima: menu em grupos com ícones, números grandes dourados, cartões com sombra.
   ====================================================================== */
body { background: radial-gradient(1200px 600px at 70% -10%, #2a1d10 0%, var(--bg) 60%); background-attachment: fixed; }
.gamebar { background: #120d08; border-bottom: 1px solid #3a2a17; }
.gamebar .brand { color: var(--gold-hi); font-family: var(--serif); font-size: 15px; }
.gamebar nav a { color: var(--text-2); }
.gamebar nav a:hover { background: var(--surface-2); }
.gamebar nav a.on { background: linear-gradient(180deg, #f0c060, #b9852c); color: var(--accent-ink); }

.side { background: #120d08; border-right: 1px solid #3a2a17; padding: 18px 12px; }
.side h1 { font-family: var(--serif); color: var(--gold-hi); font-size: 15px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.side h1 .logo { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #e6b24a, #8a5a12); color: #1a1209; font-size: 16px; flex: none; }
.side .grp { display: flex; align-items: center; gap: 6px; width: calc(100% - 12px); background: none; border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); opacity: 0.8; margin: 12px 6px 4px; padding: 5px 4px; text-align: left; }
.side .grp:hover { opacity: 1; background: rgba(255, 255, 255, 0.04); }
.side .grp .arrow { color: var(--accent); font-size: 14px; transition: transform 0.15s; display: inline-block; }
.side .grp.open .arrow { transform: rotate(90deg); }
.side .grp-links.shut { display: none; }
.side nav a { color: var(--text-2); padding: 7px 10px; border-radius: 10px; justify-content: flex-start; gap: 10px; font-size: 13.5px; }
.side nav a .ico { width: 20px; text-align: center; flex: none; }
.side nav a .lbl { flex: 1; min-width: 0; }
.side nav a:hover { background: rgba(230, 178, 74, 0.08); color: var(--text); }
.side nav a.on { background: rgba(230, 178, 74, 0.18); color: var(--gold-hi); font-weight: 700; }
.side .foot button { width: 100%; }

.head h2 { font-family: var(--serif); color: var(--gold-hi); font-size: 26px; font-weight: 700; }
.head .sub { color: var(--muted); }

.tile, .card { border-color: var(--border); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 215, 122, 0.06); }
.tile { padding: 14px 16px; }
.tile .k { display: flex; align-items: center; gap: 6px; }
.tile .v { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.5px; color: var(--gold-hi); font-size: 28px; }
.tile .v.long { font-size: 18px; letter-spacing: 0; line-height: 1.25; margin-top: 4px; }
.tile .n.up { color: var(--good); }
.tile .n.down { color: var(--bad); }
/* Número clicável (10/11/2026): abre o detalhe. */
.tile.click { position: relative; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.tile.click:hover, .tile.click:focus-visible { border-color: var(--gold-hi); transform: translateY(-1px); outline: none; }
.tile.click .go { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 14px; }
.tile.click:hover .go { color: var(--gold-hi); }
.help { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 700; cursor: help; flex: none; font-family: system-ui, sans-serif; }
.card h3 { font-family: var(--serif); color: var(--gold-hi); font-size: 17px; }
.card h3 .help { margin-left: 6px; vertical-align: 2px; }

/* Visão geral: 4 números grandes, "Precisa de atenção" e "Os jogadores voltam?". */
.hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.hero .tile { padding: 16px 18px; }
.hero .tile .ico { font-size: 22px; line-height: 1; }
.hero .tile .k { margin-top: 8px; font-size: 13px; }
.hero .tile .v { font-size: 38px; }
.hubnum .bignum { color: var(--gold-hi); }
.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.alert:hover { background: #3a2b1a; }
.alert .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.alert .dot.bad { background: var(--bad); } .alert .dot.warn { background: var(--warn); } .alert .dot.good { background: var(--good); }
.alert .t { flex: 1; min-width: 0; } .alert .t small { display: block; color: var(--muted); font-size: 12px; }
.alert .go { color: var(--accent); font-weight: 700; white-space: nowrap; }
.ret3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ret3.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ret3 > div { text-align: center; background: var(--surface-2); border-radius: 12px; padding: 14px 6px; }
.ret3 .v { font-family: "Segoe UI", system-ui, sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; color: var(--gold-hi); }
.ret3 small { display: block; color: var(--muted); margin: 2px 0 6px; }

.badge { background: var(--surface-2); color: var(--text-2); }
th { color: var(--muted); text-transform: none; }
tr.click:hover td { background: rgba(230, 178, 74, 0.06); }

input, select, textarea { background: #1a130c; border-color: var(--border); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(230, 178, 74, 0.45); outline-offset: 0; }
button { background: var(--surface-2); border-color: var(--border); color: var(--text); border-radius: 9px; }
button:hover { border-color: var(--accent); }
button.primary { background: linear-gradient(180deg, #f0c060, #b9852c); color: var(--accent-ink); border-color: #c99234; }
button.primary:hover { filter: brightness(1.06); }

/* Abas de dentro de uma página (Controle do jogo quebrado em partes). */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.subtabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 600; background: var(--surface); }
.subtabs a:hover { border-color: var(--accent); color: var(--text); }
.subtabs a.on { background: linear-gradient(180deg, #f0c060, #b9852c); color: var(--accent-ink); border-color: #c99234; }

/* Preços da Loja: grupos que abrem e fecham. */
details.grp-box { border: 1px solid var(--border); border-radius: 12px; margin: 8px 0; background: rgba(0, 0, 0, 0.12); }
details.grp-box > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; list-style: none; }
details.grp-box > summary::-webkit-details-marker { display: none; }
details.grp-box > summary::before { content: "▸"; color: var(--accent); transition: transform 0.15s; }
details.grp-box[open] > summary::before { transform: rotate(90deg); }
details.grp-box > summary .note { font-weight: 400; margin-left: auto; }
details.grp-box > .tablewrap { padding: 0 10px 8px; }

.tooltip { background: #241a10; color: var(--text); border-color: var(--border); }

@media (max-width: 1100px) { .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .hero { grid-template-columns: 1fr; } .ret3 { grid-template-columns: 1fr; } }

/* ---------- Relatório pros sócios (10/11/2026): folhas A4 claras, prontas pra "Salvar como PDF" ---------- */
.report {
  --surface: #ffffff; --surface-2: #f6f1e7; --border: #e2d6bf; --text: #2a2016; --text-2: #5a4a36; --muted: #8a7758;
  --grid: #ece3d2; --gold-hi: #9a6a12; --accent: #9a6a12; --series-1: #c8902a; --series-2: #3f86d6; --series-3: #3fa652; --series-4: #d0603c;
  --good: #2e8a3e; --bad: #c0392b;
  display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--text);
}
.report .sheet { width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 9mm 13mm; background: #fff; color: var(--text); border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,0.45); display: flex; flex-direction: column; gap: 7px; }
.report .rh { display: flex; align-items: center; gap: 12px; background: #0d0a07; color: #f3e6c8; border-radius: 8px; padding: 10px 14px; border-bottom: 3px solid #c8902a; }
.report .rh img { width: 58px; height: 58px; border-radius: 6px; }
.report .rh-t { flex: 1; }
.report .rh-co { font-family: var(--serif); font-size: 21px; font-weight: 700; color: #ffd77a; letter-spacing: 0.3px; }
.report .rh-g { font-size: 12.5px; color: #d2bf98; margin-top: 2px; }
.report .rh-m { text-align: right; font-size: 10.5px; color: #d2bf98; line-height: 1.45; }
.report .rh-p { color: #a8956f; }
.report .rs { border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; break-inside: avoid; }
.report .rs h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 15px; color: #6b4a10; }
.report .rs-d { margin: 0 0 4px; font-size: 10.5px; color: var(--muted); }
.report .rw { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.report .rkpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.report .rk { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.report .rk-l { font-size: 10.5px; color: var(--text-2); }
.report .rk-v { font-size: 19px; font-weight: 800; color: #6b4a10; font-variant-numeric: tabular-nums; }
.report .rk-n { font-size: 10px; color: var(--muted); }
.report .rk-n.up { color: var(--good); } .report .rk-n.down { color: var(--bad); }
.report .rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.report .chart { width: 100%; height: auto; }
.report .chart text { fill: var(--muted); font-size: 11px; }
.report .chart .gridline { stroke: var(--grid); }
.report table { width: 100%; font-size: 11px; }
.report th, .report td { padding: 3px 6px; border-bottom: 1px solid var(--grid); color: var(--text); }
.report th { color: var(--text-2); }
.report .tablewrap { overflow: visible; }
.report .empty { font-size: 11px; color: var(--muted); padding: 6px 0; }
.report .legend { font-size: 10.5px; color: var(--text-2); }
.report .sheet.flow .rs { break-inside: auto; }
.report .rf { margin-top: auto; text-align: center; font-size: 9.5px; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--grid); }

@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  .gamebar, .side, .head, .tip { display: none !important; }
  .page, .shell, main { display: block !important; padding: 0 !important; margin: 0 !important; background: #fff !important; overflow: visible !important; }
  .report { display: block; gap: 0; }
  .report .sheet { box-shadow: none; border-radius: 0; width: 210mm; height: 297mm; min-height: 0; overflow: hidden; break-after: page; page-break-after: always; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report .sheet:last-child { break-after: auto; page-break-after: auto; }
  /* Folha que cresce (influencers): passa pra próxima página se tiver muita parceria. */
  .report .sheet.flow { height: auto; min-height: 297mm; overflow: visible; }
}
@media (max-width: 820px) {
  .report { overflow-x: auto; align-items: flex-start; }
}

/* ---------- Influencers e parcerias (10/11/2026) ---------- */
.pform { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 8px 0; }
.pgrp { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pgrp h4 { margin: 0; font-family: var(--serif); color: var(--gold-hi); font-size: 14px; }
.pf { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.pf.row { flex-direction: row; align-items: center; gap: 6px; }
.pf input:not([type="checkbox"]), .pf select, .pf textarea { width: 100%; box-sizing: border-box; }
.pf small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .pform { grid-template-columns: 1fr; } }

/* Chat ao vivo (26/11/2026) */
.chatlog { margin-top: 10px; height: min(62vh, 640px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.chatline { padding: 6px 4px; border-bottom: 1px solid var(--grid); }
.chatline:last-child { border-bottom: 0; }
.chatline.sys { opacity: .75; }
.chatline.team { background: var(--surface-2); border-radius: 6px; }
.chathead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.chatteam { color: var(--gold-hi); }
.chattext { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.chatacts { margin-left: auto; display: flex; gap: 4px; }
.chatacts button { padding: 2px 8px; font-size: 11px; }

/* Auditoria legível (27/11/2026) */
.auditdetail { white-space: normal; word-break: break-word; max-width: 560px; font-size: 12px; color: var(--muted, inherit); }
/* Anomalias explicadas (27/11/2026): o que é / quando é normal / quando é grave / o que fazer. */
.explain { border-left: 3px solid var(--border); padding: 2px 0 2px 10px; margin: 0 0 10px; }
.explain p { margin: 3px 0; font-size: 13px; line-height: 1.45; }
