:root {
  --bg: #0b0f14;
  --bg2: #121821;
  --bg3: #1a2230;
  --line: #243044;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --entrar: #3ddc97;
  --esperar: #f5c14a;
  --queimou: #ff6b6b;
  --entrar-dim: rgba(61,220,151,.14);
  --esperar-dim: rgba(245,193,74,.14);
  --queimou-dim: rgba(255,107,107,.14);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", system-ui, sans-serif; }
body { min-height: 100vh; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.brand { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.meta { color: var(--muted); font-size: 13px; text-align: right; }
.meta strong { color: var(--text); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; }
.kpi .n { font-size: 32px; font-weight: 700; font-family: "IBM Plex Mono", monospace; line-height: 1; }
.kpi .l { margin-top: 6px; color: var(--muted); font-size: 13px; }
.kpi.entrar { box-shadow: inset 3px 0 0 var(--entrar); }
.kpi.esperar { box-shadow: inset 3px 0 0 var(--esperar); }
.kpi.queimou { box-shadow: inset 3px 0 0 var(--queimou); }
.kpi.active { background: var(--bg3); }
.charts { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; margin-bottom: 12px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 10px; }
.card h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.card canvas { width: 100% !important; height: 280px !important; }
.wide { margin-bottom: 18px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
input[type=search] { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; min-width: 220px; font: inherit; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; }
.chip.on { color: var(--text); background: var(--bg3); border-color: #3a4b64; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.body:hover { background: rgba(255,255,255,.03); }
tr.body { cursor: pointer; }
.mono { font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.pill.entrar { background: var(--entrar-dim); color: var(--entrar); }
.pill.esperar { background: var(--esperar-dim); color: var(--esperar); }
.pill.queimou { background: var(--queimou-dim); color: var(--queimou); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.muted { color: var(--muted); }
.details td { background: #0e141c; padding: 0 10px 14px 10px; }
.details .box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.details strong { color: var(--text); }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.foot { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 900px) {
  .charts, .kpis { grid-template-columns: 1fr; }
  .meta { text-align: left; }
}
.chartbox { width: 100%; height: 280px; position: relative; }
.chartbox svg { width: 100%; height: 100%; display: block; }
.hbar { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 12px; }
.hbar .lab { width: 140px; text-align: right; color: #c5d0dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.hbar .track { flex: 1; height: 10px; background: #1e293b; border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; }
.hbar .val { width: 48px; font-family: "IBM Plex Mono", monospace; color: #8b9bb0; font-size: 11px; }
.vbars { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 8px 4px 0; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 0; }
.vbar .col { width: 100%; max-width: 28px; border-radius: 4px 4px 0 0; }
.vbar .n { margin-top: 6px; font-size: 9px; color: #8b9bb0; transform: rotate(-40deg); transform-origin: top left; white-space: nowrap; height: 36px; }
#bars.chartbox, #grav.chartbox { height: auto; min-height: 260px; overflow: auto; }
.tip { position: absolute; background: #0e141c; border: 1px solid #243044; color: #e8eef6; font-size: 12px; padding: 4px 8px; border-radius: 6px; pointer-events: none; display: none; z-index: 5; }
