:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #6b7585;
  --line: #e4e8ef;
  --brand: #0f6e56;
  --brand-2: #12826a;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;
  --shadow: 0 10px 30px rgba(21, 32, 51, 0.06);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 110, 86, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(21, 32, 51, 0.08), transparent 50%),
    var(--bg);
}
a { color: var(--brand); text-decoration: none; }
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: #102033;
  color: #e8eef7;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; padding: 0 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar a {
  color: #c9d4e4;
  padding: 10px 12px;
  border-radius: 10px;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.side-foot { padding: 8px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; }
.side-foot .muted { color: #9aadc4; margin-bottom: 6px; }
.main { padding: 28px; }
.top h1 { margin: 0 0 18px; font-size: 26px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.form-row { margin-bottom: 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}
.btn:hover { background: var(--brand-2); }
.btn.secondary { background: #223247; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; }
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.alert.ok { background: #ecfdf3; color: var(--ok); }
.alert.err, .alert.error { background: #fef3f2; color: var(--danger); }
.alert.warn { background: #fffaeb; color: var(--warn); }
.help, .muted { color: var(--muted); font-size: 13px; }
.login-wrap {
  max-width: 480px;
  margin: 8vh auto;
  padding: 0 16px;
}
.brand2 {
  font-size: 28px;
  font-weight: 750;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5f2;
  color: var(--brand);
  font-size: 12px;
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 2; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .grid, .two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid, .two, .sidebar nav { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}
