:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

.container { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { font-size: 20px; font-weight: 700; color: var(--text); }
.brand span { color: var(--primary); }
.nav a { margin-left: 18px; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--primary); }

/* hero */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero p { font-size: 16px; opacity: 0.92; max-width: 640px; margin: 0 auto; }

/* 分区 */
.section { padding: 40px 0; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
}

/* 卡片列表 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.card .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: #374151; font-size: 15px; white-space: pre-wrap; }
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  margin-right: 8px;
}
.tag.notice { background: #fef3c7; color: #b45309; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* 页脚 */
.footer {
  background: #111827;
  color: #9ca3af;
  padding: 32px 0;
  margin-top: 40px;
  font-size: 14px;
  text-align: center;
}
.footer a { color: #9ca3af; }
.footer .line { margin: 4px 0; }

/* 表单与按钮（后台） */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #6b7280; }
.btn.danger { background: #dc2626; }
.btn.small { padding: 6px 12px; font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
  margin: 60px auto;
}
.panel.wide { max-width: 820px; }
.panel h2 { margin-bottom: 20px; font-size: 22px; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.admin-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.admin-item .info h4 { font-size: 16px; margin-bottom: 4px; }
.admin-item .info .meta { font-size: 12px; color: var(--muted); }
.admin-item .actions { display: flex; gap: 8px; flex-shrink: 0; }

.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; display: none; }
.msg.ok { display: block; background: #dcfce7; color: #166534; }
.msg.err { display: block; background: #fee2e2; color: #991b1b; }

.hidden { display: none; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
