:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #8a8a8a;
  --line: #e5e5e5;
  --accent: #2563eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* 顶部导航 */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
}
.nav .brand {
  font-size: 18px;
  font-weight: 700;
  margin-right: auto;
}
.nav a.item { color: #555; }
.nav a.item.active { color: var(--fg); font-weight: 600; }

/* 内容容器 */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 32px 0 12px; }
.muted { color: var(--muted); }

/* 卡片 / 行 */
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
}

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 600; font-size: 14px; }
tr:last-child td { border-bottom: none; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: #555;
}
.tag.ok { color: #16a34a; border-color: #16a34a; }
.tag.miss { color: #dc2626; border-color: #dc2626; }

/* 表单 */
input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field { margin-bottom: 14px; }

/* 按钮 */
button, .btn {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--fg);
  border-radius: 6px;
  background: var(--fg);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
button.ghost, .btn.ghost {
  background: #fff;
  color: var(--fg);
}
button.danger { background: #fff; color: #dc2626; border-color: #dc2626; }
button.small { padding: 4px 12px; font-size: 13px; }

/* 提示 */
.loading, .empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* 工具栏 */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { margin-left: auto; }

/* 后台布局 */
.admin-body { display: none; }
.admin-body.show { display: block; }