/* 协会官网 · 基础样式：简洁干净，无框架、无构建 */
:root {
  --accent: #16794e;
  --accent-dark: #0f5c39;
  --accent-soft: #e8f4ec;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --amber: #92400e;
  --amber-soft: #fffbeb;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 24px; padding-bottom: 64px; min-height: 60vh; }

/* ---- 顶栏 ---- */
header.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
nav.main-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
nav.main-nav a {
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 15px;
}
nav.main-nav a:hover { background: var(--accent-soft); text-decoration: none; }
nav.main-nav a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.auth-area { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.auth-area .user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 通用 ---- */
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 28px 0 12px; }
h3 { font-size: 17px; margin: 20px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.notice.warn { border-left-color: #d97706; background: var(--amber-soft); }
.notice.error { border-left-color: var(--danger); background: var(--danger-soft); }
.error-text { color: var(--danger); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* ---- 按钮 ---- */
.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 15px;
  cursor: pointer;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; background: #f3f4f6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { padding: 4px 10px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- 表单 ---- */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 4px; }
input[type="text"], input[type="email"], input[type="date"], input[type="time"],
input[type="url"], textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: normal; }
.checkbox-line input { width: auto; }

/* ---- 首页 hero ---- */
.hero {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--accent-dark);
  color: #fff;
}
.hero.has-bg { background-size: cover; background-position: center; }
.hero-inner { padding: 40px 28px; background: rgba(0, 0, 0, 0.35); }
.hero.has-bg .hero-inner { background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)); }
.hero h1 { margin: 0 0 8px; font-size: 28px; }
.hero p { margin: 0; opacity: 0.95; white-space: pre-line; }

/* ---- 活动卡片 ---- */
.day-card { display: flex; flex-direction: column; gap: 8px; }
.day-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.day-date { font-weight: 700; font-size: 17px; }
.day-title { font-weight: 700; font-size: 17px; }
.day-meta { color: var(--muted); font-size: 14px; }
.day-desc { white-space: pre-line; }
.day-img { border-radius: 8px; max-height: 260px; width: 100%; object-fit: cover; }
.slots { font-size: 14px; }
.slots.full { color: var(--danger); font-weight: 600; }
.badge {
  display: inline-block;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved { background: var(--accent-soft); color: var(--accent-dark); }
.badge.rejected { background: #f3f4f6; color: var(--muted); }

/* ---- 列表/表格 ---- */
.list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.list-row:last-child { border-bottom: none; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.admin-table th { color: var(--muted); font-weight: 600; }

/* ---- 管理页标签页 ---- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tabs button {
  border: none;
  background: none;
  padding: 10px 12px;
  font-size: 15px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button.active { color: var(--accent-dark); font-weight: 700; border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- 批量创建行 ---- */
.batch-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .batch-row { grid-template-columns: 1fr 1fr; }
}

/* ---- toast ---- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; }

/* ---- 页脚 ---- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px 32px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
footer.site-footer .container { padding: 0; }
