:root {
  --bg: #0d0d0f;
  --bg2: #17171b;
  --bg3: #1f1f25;
  --border: #2c2c34;
  --gold: #ff9500;
  --gold2: #ffb340;
  --gold-dim: rgba(255, 149, 0, .15);
  --text: #e8e8ec;
  --text-dim: #9a9aa5;
  --red: #ff453a;
  --green: #32d74b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0;
  background: linear-gradient(180deg, #141418, #0d0d0f);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 0; height: 100vh;
}
.logo {
  font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 28px;
  background: linear-gradient(90deg, var(--gold), #ffd60a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 2px;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 26px; color: var(--text-dim); font-size: 15px;
  border-left: 3px solid transparent; transition: all .2s;
}
.nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav a:hover { color: var(--gold2); background: var(--gold-dim); }
.nav a.active {
  color: var(--gold); border-left-color: var(--gold);
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  font-weight: 600;
}
.main { flex: 1; padding: 28px 34px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.topbar h1 { font-size: 22px; font-weight: 700; }
.topbar h1::before { content: ""; display: inline-block; width: 5px; height: 20px; background: var(--gold); border-radius: 3px; margin-right: 10px; vertical-align: -2px; }
.topbar .who { color: var(--text-dim); font-size: 14px; }

/* ---------- 卡片 / 统计 ---------- */
.card {
  background: linear-gradient(145deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; margin-bottom: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.card h2 { font-size: 16px; margin-bottom: 16px; color: var(--gold2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat {
  background: linear-gradient(145deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
  background: radial-gradient(circle, var(--gold-dim), transparent 70%); border-radius: 50%;
}
.stat .label { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.stat .value { font-size: 30px; font-weight: 800; color: var(--gold); }
.stat .value.green { color: var(--green); }
.stat .value.red { color: var(--red); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--gold2); font-weight: 600; padding: 12px 10px; border-bottom: 1px solid var(--gold); }
td { padding: 12px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:hover td { background: rgba(255,149,0,.04); }
td img { height: 42px; border-radius: 6px; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-block; padding: 9px 20px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #ff7a00);
  color: #1a1200; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,149,0,.35); transition: all .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,149,0,.5); }
.btn.small { padding: 5px 12px; font-size: 12px; box-shadow: none; }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn.danger { background: linear-gradient(135deg, var(--red), #c62d23); color: #fff; box-shadow: none; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #101014; color: var(--text);
  font-size: 14px; outline: none; transition: border .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type=file] { padding: 8px; }
label { display: block; color: var(--text-dim); font-size: 13px; margin: 12px 0 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.form-actions { margin-top: 18px; }
.inline-form { display: inline; }
.inline-form input, .inline-form select { width: auto; display: inline-block; padding: 5px 8px; font-size: 12px; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.tag.on { background: rgba(50,215,75,.15); color: var(--green); }
.tag.off { background: rgba(255,69,58,.15); color: var(--red); }
.tag.gold { background: var(--gold-dim); color: var(--gold); }

/* ---------- 双色球球 ---------- */
.ball { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; font-weight: 700; margin-right: 4px; }
.ball.red { background: linear-gradient(145deg, #ff5546, #d92b1e); color: #fff; }
.ball.blue { background: linear-gradient(145deg, #3f8cff, #1b5fd9); color: #fff; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top, #1c1206 0%, var(--bg) 55%); }
.login-box { width: 380px; padding: 44px 38px; border-radius: 18px;
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.login-box .logo { font-size: 28px; margin-bottom: 30px; }
.login-box .btn { width: 100%; margin-top: 24px; padding: 12px; font-size: 16px; }
.error { color: var(--red); font-size: 13px; margin-top: 10px; text-align: center; }
