:root {
  --ink: #1c2430;
  --muted: #6d7786;
  --line: #e6eaf0;
  --bg: #f6f4fb;
  --card: #ffffff;
  --brand: #8b4dff;
  --brand-2: #ff8a3d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 32px 16px;
  background: linear-gradient(160deg, #fff1dc, #f4e9ff);
}
.login-card {
  width: 380px;
  padding: 32px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(80, 40, 140, 0.12);
}
.mark { color: var(--brand); font-weight: 700; }
.login-card h1 { margin: 8px 0; }
.login-card p, .hint { color: var(--muted); }
.login-card label, .form label { display: block; margin: 14px 0; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
button, .btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: #efeafc;
  color: #5b3cc4;
}
.login-card button, .primary {
  background: linear-gradient(120deg, var(--brand-2), var(--brand));
  color: #fff;
}
.login-card button { width: 100%; padding: 12px; }
.err { color: #c2414a; min-height: 1.2em; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside { background: #221c33; color: #fff; padding: 20px 12px; }
.brand { font-weight: 700; padding: 4px 10px 16px; }
nav button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 2px 0;
  background: transparent;
  color: #ddd4ee;
}
nav button.on { background: rgba(255,255,255,0.12); color: #fff; }
main { padding: 22px 28px 48px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
header h2 { margin: 0; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.who button { background: #efeafc; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card, .panel {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(40, 30, 70, 0.04);
}
.card b { display: block; font-size: 28px; margin-top: 6px; }
.toolbar, .row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; margin: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: #faf9fc; }
.stem { max-width: 460px; }
.form { display: grid; gap: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.danger { background: #fde8ea; color: #b4232c; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.block { margin-top: 12px; }
.muted { color: var(--muted); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .cards, .grid2 { grid-template-columns: 1fr; }
}
