:root {
  --bg: #0f1115;
  --panel: #171a21;
  --line: #262b35;
  --text: #e6e8ee;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --good: #38c172;
  --bad: #e3342f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
}
nav {
  display: flex; gap: 4px; padding: 12px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
nav a {
  color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 8px;
}
nav a:hover { background: var(--line); color: var(--text); }
nav a.active { background: var(--accent); color: #fff; }
nav a.exit { margin-left: auto; }
main { padding: 24px; max-width: 1280px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.tile-label { color: var(--muted); font-size: 13px; }
.tile-value { font-size: 24px; font-weight: 600; margin-top: 6px; }
.delta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.periods { display: flex; gap: 6px; margin: 22px 0 12px; }
.periods button {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 14px;
}
.periods button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 14px; }
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; height: 320px; padding: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: none; }
td.empty { color: var(--muted); text-align: center; padding: 24px; }
form.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
input, select, button {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 14px;
}
body.login { display: flex; align-items: center; justify-content: center; height: 100vh; }
body.login form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 12px; width: 320px; }
body.login button { background: var(--accent); border-color: var(--accent); color: #fff; cursor: pointer; }
.error { color: var(--bad); font-size: 14px; }
.pager { display: flex; gap: 8px; margin-top: 14px; }
.pager a { color: var(--muted); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }
.oops { text-align: center; padding: 80px 20px; }
.oops-code { font-size: 64px; font-weight: 600; color: var(--muted); }
.oops p { color: var(--muted); }
.oops a { color: var(--accent); text-decoration: none; }
