/* Dark, Obsidian-like. One accent, tabular numbers, no chrome that isn't needed. */
:root {
  --bg: #1e1e1e;
  --bg-2: #262626;
  --bg-3: #2f2f2f;
  --line: #3a3a3a;
  --text: #dadada;
  --muted: #9a9a9a;
  --accent: #7c5cff;
  --pos: #4ade80;
  --neg: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2);
  position: sticky; top: 0; z-index: 2;
}
.title { font-size: 17px; font-weight: 700; }
.sub { color: var(--muted); font-size: 13px; }
.right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  background: transparent; color: var(--text); border: 0; border-right: 1px solid var(--line);
  padding: 6px 11px; font-size: 13px; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: #fff; }
.btn {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 11px; font-size: 13px; cursor: pointer; text-decoration: none;
}
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card h2 { font-size: 14px; margin: 0 0 12px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--bg-3); }
.name { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.chart .bar-col { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.chart .bar-col:hover { opacity: 1; }
.chart-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.err { border-color: #7f1d1d; background: rgba(220,38,38,.12); }
@media (max-width: 640px) { .name { max-width: 200px; } main { padding: 12px; } }

.form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form input[type="email"], .form input, select {
  background: var(--bg-3); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 14px; min-width: 150px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.small.on { background: rgba(124,92,255,.22); border-color: var(--accent); }
.btn.danger { border-color: #7f1d1d; color: #f87171; }
.check { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.small { font-size: 12px; }
