/* Painel de campanhas — estilo enxuto, tema claro/escuro automatico. */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1a1c1f; --muted: #6b7280;
  --line: #e5e7eb; --accent: #2563eb; --pos: #15803d; --neg: #b91c1c;
  --bar: #93c5fd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --panel: #171a1f; --ink: #e8eaed; --muted: #9aa0aa;
    --line: #2a2e35; --accent: #60a5fa; --pos: #4ade80; --neg: #f87171;
    --bar: #1e40af;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--ink); }
.topbar { display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; flex-wrap: wrap; }
.topbar h1 { font-size: 1.15rem; margin: 0; }
.controls { display: flex; gap: .75rem; align-items: center; }
.controls label { font-size: .85rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
select, button { font: inherit; padding: .4rem .6rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
button { cursor: pointer; background: var(--accent); color: #fff; border: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem; margin-bottom: 1.25rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.card .label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.card .value { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.panel h2 { font-size: 1rem; margin: 0 0 .8rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); }

.goals { display: grid; gap: .7rem; }
.goal { display: grid; gap: .3rem; }
.goal .head { display: flex; justify-content: space-between; font-size: .85rem; }
.progress { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }

.monthly { display: grid; gap: .4rem; }
.mrow { display: grid; grid-template-columns: 90px 1fr 120px; align-items: center; gap: .6rem; font-size: .85rem; }
.mbar { height: 14px; border-radius: 5px; background: var(--bar); min-width: 2px; }
.footnote { color: var(--muted); font-size: .8rem; }
