:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2a2d3a;
  --text: #e2e8f0;
  --muted: #8892a4;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a78bfa;
  --accent: #6366f1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Login ── */
#login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 14px;
}
#login h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
#login p { color: var(--muted); font-size: 12px; }
#login input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  width: 300px;
  outline: none;
}
#login input:focus { border-color: var(--accent); }
#login button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 300px;
  transition: opacity .15s;
}
#login button:hover { opacity: .88; }

/* ── Layout ── */
#dashboard { display: none; }
.container { max-width: 1360px; margin: 0 auto; padding: 24px 28px; }

/* ── Header ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.updated { font-size: 11px; color: var(--muted); }

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green  { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-yellow { background: rgba(245,158,11,.15); color: var(--yellow); }
.badge-red    { background: rgba(239,68,68,.15);  color: var(--red); }
.badge-purple { background: rgba(167,139,250,.15);color: var(--purple); }
.badge-gray   { background: rgba(136,146,164,.12);color: var(--muted); }

/* ── Charts ── */
.charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.chart-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 14px;
}
.chart-wrap { position: relative; height: 190px; }
.no-data {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding-top: 70px;
}

/* ── Activities Table ── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
}
.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 14px;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(42,45,58,.5);
  font-size: 13px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }
.rpe-dots { font-size: 9px; letter-spacing: 2px; }
.rpe-filled { color: var(--yellow); }
.rpe-empty  { color: var(--border); }
