:root {
  --bg: #0c1117;
  --panel: #151c25;
  --line: #2a3544;
  --text: #e8eef6;
  --muted: #8ea0b5;
  --accent: #3dcc8c;
  --gold: #d4a017;
  --ok: #3dcc8c;
  --bad: #ef6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 12px; }
.auth-card h1 { margin: 0; }
.links { display: grid; gap: 6px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea, button { font: inherit; color: var(--text); }
input, select, textarea { background: #0c1117; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
button { background: var(--accent); color: #082016; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.gold { background: var(--gold); color: #111; }
.app { display: grid; grid-template-columns: 200px 1fr; min-height: 100%; }
.nav { background: #10161e; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.brand { font-weight: 800; color: var(--gold); padding: 8px 10px 16px; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--text); }
.nav a.active, .nav a:hover { background: #223042; }
.nav button { margin-top: auto; }
main { padding: 20px 24px 48px; overflow: auto; }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.error, .flash { color: var(--bad); }
.flash.ok { color: var(--ok); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 20px; margin-top: 6px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.form { display: grid; gap: 10px; max-width: 520px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #223042; font-size: 12px; }
.game { display: grid; gap: 8px; }
.game button { width: 100%; }
.bar { height: 10px; background: #223042; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.promo { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav button { margin-top: 0; width: 100%; }
  .row-2 { grid-template-columns: 1fr; }
}
