:root {
  --bg1: #0f172a;
  --bg2: #1e293b;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-2: #06b6d4;
  /* Barra de meta — controle de largura (px) */
  --meta-bar-width: 125px;
  /* Barra de meta — cor de fundo (track) */
  --meta-bar-bg: rgba(233, 233, 233, 0.14);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg1);
}
.page { min-height: 100%; display: grid; grid-template-rows: auto 1fr; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; position: sticky; top: 0; background: var(--bg1); z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .title { font-size: 22px; font-weight: 700; }
.logo { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 6px 14px rgba(34,197,94,0.35); }
.content { display: grid; align-content: start; gap: 16px; padding: 16px; overflow-x: hidden; }
.page-title { margin-top: 6px; font-size: 18px; font-weight: 700; color: var(--text); text-align: center; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: rgba(255,255,255,0.06); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 14px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.rank-list { display: grid; gap: 8px; }
.rank-item { display: grid; grid-template-columns: 28px 44px 1fr auto; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); }
.rk { font-size: 11px; color: var(--muted); text-align: center; }
.photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.info { display: grid; gap: 4px; }
.info .name { font-size: 10px; font-weight: 400; color: var(--text); }
.info .meta { font-size: 10px; color: var(--muted); }
.val { font-size: 12px; font-weight: 400; color: var(--text); text-align: right; }
.val.meta { color: #22c55e; }
.val.prev { color: #b45555; font-weight: 400; }
.vals { display: grid; row-gap: 3px; }
.val-row { display: grid; grid-template-columns: max-content auto; column-gap: 8px; justify-items: end; align-items: baseline; }
.label { font-size: 10px; color: var(--muted); text-align: right; }
.progress { width: var(--meta-bar-width); height: 2px; justify-self: end; background: var(--meta-bar-bg); border-radius: 2px; }
/* Barra de meta — altere --meta-bar-width para controlar a largura */
.progress-fill { height: 100%; border-radius: 2px; }
.progress-fill.low { background: rgba(255, 63, 63, 0.85); }
.progress-fill.mid { background: rgba(255, 170, 22, 0.85); }
.progress-fill.high { background: rgba(20, 250, 104, 0.85); }
.graphs { display: none; grid-template-columns: 1fr; gap: 6px; padding: 8px 8px 10px; border-left: 2px solid rgba(255,255,255,0.10); margin-left: 24px; }
.graphs.open { display: grid; }
.graph-title { font-size: 11px; color: var(--muted); }
.graph-evolucao { min-height: 40px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; }
.graph-ramos { min-height: 40px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; overflow: hidden; }
.graph-ativos { min-height: 40px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 8px; overflow: hidden; }
.empty { font-size: 13px; color: var(--muted); }
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
