:root {
  --side: #0c1726;
  --side-2: #122033;
  --gold: #c9a44a;
  --gold-2: #e7c56a;
  --text: #1f2a37;
  --muted: #6b7785;
  --line: #e6ebf1;
  --bg: #f3f5f8;
  --card: #fff;
  --blue: #1d4f91;
  --blue-2: #2b6cb0;
  --ok: #2f9e62;
  --warn: #d48b1a;
  --err: #c4453c;
  --shadow: 0 8px 24px rgba(16, 36, 64, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--gold); }
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(201,164,74,.18), transparent 50%),
    linear-gradient(160deg, #071018 0%, #0e2238 42%, #08131f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dbe7f3;
}
.login-wrap {
  width: 920px;
  max-width: calc(100% - 32px);
  min-height: 460px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: rgba(8, 18, 32, .78);
  border: 1px solid rgba(201,164,74,.28);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.login-brand {
  padding: 48px 40px;
  background:
    linear-gradient(180deg, rgba(201,164,74,.12), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 12px, transparent 12px 24px);
  border-right: 1px solid rgba(201,164,74,.18);
}
.logo-mark {
  width: 48px; height: 48px;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.logo-mark span { transform: rotate(-45deg); color: var(--gold-2); font-weight: 700; letter-spacing: 1px; }
.login-brand h1 { margin: 0 0 8px; font-size: 28px; color: #f4efe2; font-weight: 700; }
.login-brand .sub { color: var(--gold); letter-spacing: 3px; font-size: 12px; margin-bottom: 28px; }
.login-brand p { color: #9fb3c8; line-height: 1.8; margin: 0; }
.login-meta { margin-top: 48px; font-size: 12px; color: #7e93a8; }
.login-form { padding: 48px 40px; }
.login-form h2 { margin: 0 0 6px; color: #fff; font-size: 20px; }
.login-form .hint { color: #8aa0b5; margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: #c5d4e2; }
.field input {
  width: 100%; height: 40px; border: 1px solid #2a4158; background: #0b1a2b;
  color: #fff; padding: 0 12px; outline: none;
}
.field input:focus { border-color: var(--gold); }
.captcha-row { display: grid; grid-template-columns: 1fr 128px; gap: 10px; align-items: end; }
.captcha-row img { height: 40px; width: 128px; cursor: pointer; border: 1px solid #2a4158; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border: 0; cursor: pointer; background: var(--blue);
  color: #fff; font-size: 13px;
}
.btn:hover { background: var(--blue-2); }
.btn-gold { background: linear-gradient(180deg, #d7b45c, #b58a2e); color: #2b210c; font-weight: 700; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-block { width: 100%; height: 42px; margin-top: 8px; }
.btn-ok { background: var(--ok); }
.btn-err { background: var(--err); }
.btn-ghost { background: #fff; color: var(--blue); border: 1px solid #c9d6e5; }
.alert { padding: 10px 12px; margin-bottom: 14px; background: rgba(196,69,60,.15); color: #ffb4ae; border: 1px solid rgba(196,69,60,.35); }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; background: var(--side); color: #c9d6e4; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.side-brand {
  padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.side-brand .name { color: #f3ead4; font-size: 16px; font-weight: 700; }
.side-brand .code { color: var(--gold); font-size: 11px; letter-spacing: 1px; margin-top: 4px; }
.menu { flex: 1; overflow: auto; padding: 10px 0 24px; }
.menu a, .menu .grp-title {
  display: block; padding: 8px 18px; color: #b7c6d6; cursor: pointer;
}
.menu a:hover, .menu .grp-title:hover { background: var(--side-2); color: #fff; }
.menu a.active { background: #173152; color: var(--gold-2); border-left: 3px solid var(--gold); padding-left: 15px; }
.menu .grp-title { font-size: 12px; color: #7f91a6; margin-top: 8px; }
.menu .sub a { padding-left: 28px; font-size: 13px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 52px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.crumb { color: var(--muted); }
.crumb b { color: var(--text); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.top-right .admin { color: var(--text); }
.badge {
  display: inline-block; min-width: 18px; padding: 0 6px; height: 18px; line-height: 18px;
  border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; text-align: center;
}
.content { padding: 16px 18px 28px; }
.flash { margin: 0 18px; padding: 10px 12px; }
.flash.ok { background: #e8f7ee; color: #20764a; }
.flash.err { background: #fdecec; color: #a1322c; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px 16px;
}
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 24px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.card .s { color: var(--muted); margin-top: 6px; font-size: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 14px; }
.panel-h {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-h h3 { margin: 0; font-size: 14px; }
.panel-b { padding: 12px 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar input, .toolbar select {
  height: 32px; border: 1px solid #cfd8e3; padding: 0 8px; background: #fff;
}
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td {
  padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap;
}
table.data th { background: #f7f9fc; color: #526274; font-weight: 600; }
table.data tfoot td { background: #f7f9fc; font-weight: 600; }
table.data tr:hover td { background: #f8fafc; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 2px; font-size: 12px;
  background: #eef2f6; color: #4c5c6c;
}
.tag-ok { background: #e6f6ed; color: #20764a; }
.tag-err { background: #fdecec; color: #a1322c; }
.tag-warn { background: #fff4e0; color: #9a640d; }
.tag-blue { background: #e8f1fb; color: #1d4f91; }
.pager { display: flex; gap: 6px; justify-content: flex-end; padding: 10px 0 0; align-items: center; color: var(--muted); }
.pager a, .pager span {
  min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--text); padding: 0 8px;
}
.pager a.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; }
.grid-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.kv { display: flex; gap: 8px; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.kv .l { color: var(--muted); width: 96px; flex-shrink: 0; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.event-list .t { color: var(--muted); font-size: 12px; }
.hero {
  display: flex; gap: 16px; align-items: center; padding: 4px 0 12px;
}
.avatar {
  width: 56px; height: 56px; border-radius: 4px; background: #1d4f91; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
}
.muted { color: var(--muted); }
.pos { color: var(--ok); font-weight: 600; }
.neg { color: var(--err); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .full { grid-column: 1 / -1; }
textarea { width: 100%; min-height: 80px; border: 1px solid #cfd8e3; padding: 8px; font-family: inherit; }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }
@media (max-width: 980px) {
  .login-wrap, .cards, .grid-2, .form-grid, .grid-kv { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
