/* ============================================================
   学子桥 - 社区平台样式
   设计方向：学院风深墨绿 + 金黄强调，正式而温暖
   ============================================================ */

:root {
  /* 色板 */
  --bg: #f6f4ef;
  --bg-soft: #efece3;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --primary: #134e4a;
  --primary-700: #0f3e3b;
  --primary-600: #155f5a;
  --primary-50: #e6f0ef;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --success: #15803d;
  --info: #1d4ed8;

  --text: #1c2422;
  --text-2: #44524f;
  --text-muted: #7a8480;
  --border: #e3dfd5;
  --border-strong: #d3cdbe;
  --ring: rgba(19, 78, 74, 0.28);

  /* 排版 */
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;

  /* 尺寸 */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(28, 36, 34, 0.06);
  --shadow: 0 4px 16px rgba(28, 36, 34, 0.08);
  --shadow-lg: 0 14px 44px rgba(19, 78, 74, 0.18);
  --topbar-h: 64px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1614;
    --bg-soft: #131c1a;
    --surface: #161f1d;
    --surface-2: #1b2522;
    --primary: #2d7a73;
    --primary-700: #1f5a55;
    --primary-600: #348a82;
    --primary-50: #142624;
    --accent: #f59e0b;
    --accent-soft: #2a210a;
    --text: #e8ede9;
    --text-2: #b8c2bd;
    --text-muted: #828d88;
    --border: #26302d;
    --border-strong: #36423e;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
code { font-family: 'SFMono-Regular', Consolas, monospace; background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; font-size: 0.88em; }

.hidden { display: none !important; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); box-shadow: 0 6px 16px rgba(19, 78, 74, 0.3); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #b9640a; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: 10px;
  transition: all 0.18s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }

/* ============================================================
   登录注册
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(19, 78, 74, 0.10), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(217, 119, 6, 0.08), transparent 42%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px 30px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--primary);
  color: var(--accent);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(19, 78, 74, 0.28);
}
.auth-brand h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 1px;
}
.auth-brand p { margin: 2px 0 0; color: var(--text-muted); font-size: 12.5px; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  transition: all 0.2s;
}
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active { display: flex; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.18s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.auth-hint { text-align: center; color: var(--text-muted); font-size: 12.5px; margin: 4px 0 0; }
.auth-foot { margin-top: 22px; color: var(--text-muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.foot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============================================================
   顶部导航
   ============================================================ */
.app { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .topbar { background: rgba(14, 22, 20, 0.85); }
}
.topbar-inner {
  height: var(--topbar-h);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--primary); }
.brand-logo { display: grid; place-items: center; color: var(--primary); }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--primary);
}
.menu-toggle { display: none; }

.topnav { display: flex; gap: 4px; margin-left: 16px; }
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.18s;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: var(--primary); color: #fff; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.18s;
}
.user-chip:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}
.user-name { font-size: 14px; font-weight: 600; color: var(--text); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.role-badge.empty { display: none; }

/* ============================================================
   主内容
   ============================================================ */
.main { padding: 28px 24px 96px; }
.container { max-width: var(--maxw); margin: 0 auto; }

.page-head { margin-bottom: 22px; }
.page-head h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 900;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: 0.5px;
}
.page-head p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* 通用卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-pad { padding: 20px 22px; }

/* ============================================================
   问答墙
   ============================================================ */
.qa-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.qa-main { display: flex; flex-direction: column; gap: 16px; }

.qa-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: all 0.15s;
}
.filter-chip:hover { background: var(--border); }
.filter-chip.active { background: var(--primary); color: #fff; }

.qa-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all 0.2s;
}
.qa-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.qa-item.answered { border-left: 3px solid var(--success); }
.qa-item.pinned { border-left: 3px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft) 0%, var(--surface) 30%); }

.qa-meta-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qa-author { display: flex; align-items: center; gap: 9px; }
.qa-author img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.qa-author-info { display: flex; flex-direction: column; line-height: 1.3; }
.qa-author-name { font-size: 13px; font-weight: 600; color: var(--text); }
.qa-author-sub { font-size: 11.5px; color: var(--text-muted); }
.qa-time { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.tag-pin { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }

.qa-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 8px;
  color: var(--text);
}
.qa-content { color: var(--text-2); font-size: 14.5px; margin: 0 0 14px; white-space: pre-wrap; word-break: break-word; }
.qa-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 500;
}

.qa-actions { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--border); }
.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.15s;
}
.act-btn:hover { background: var(--bg-soft); color: var(--text); }
.act-btn.liked { color: var(--danger); }
.act-btn.liked svg { fill: var(--danger); }
.act-btn svg { transition: all 0.2s; }
.act-btn:active svg { transform: scale(1.25); }

.qa-answers { margin-top: 14px; padding-top: 4px; display: none; }
.qa-answers.show { display: block; }
.answer {
  padding: 14px 0;
  border-top: 1px dashed var(--border);
}
.answer:first-child { border-top: none; }
.answer-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.answer-head img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.answer-name { font-size: 13px; font-weight: 600; }
.answer-role { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-weight: 700; }
.answer-role.alumni { background: var(--accent-soft); color: var(--accent); }
.answer-time { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.answer-body { font-size: 14px; color: var(--text); padding-left: 35px; white-space: pre-wrap; }
.answer-box { margin-top: 10px; padding-left: 35px; }
.answer-box textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); resize: vertical; min-height: 70px; }
.answer-box-actions { margin-top: 8px; display: flex; justify-content: flex-end; gap: 8px; }

/* 侧栏 */
.qa-aside { position: sticky; top: calc(var(--topbar-h) + 28px); display: flex; flex-direction: column; gap: 16px; }
.aside-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.aside-block h3 { font-family: var(--font-serif); font-size: 15.5px; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.stat-row { display: flex; gap: 10px; }
.stat { flex: 1; text-align: center; padding: 14px 6px; background: var(--bg-soft); border-radius: var(--radius); }
.stat-num { font-family: var(--font-serif); font-size: 22px; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.hot-list { list-style: none; padding: 0; margin: 0; }
.hot-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 8px; font-size: 13px; }
.hot-list li:last-child { border-bottom: none; }
.hot-rank { font-family: var(--font-serif); font-weight: 900; color: var(--accent); min-width: 18px; }
.hot-list li:nth-child(n+4) .hot-rank { color: var(--text-muted); }
.hot-list a { color: var(--text-2); transition: color 0.15s; }
.hot-list a:hover { color: var(--primary); }

/* ============================================================
   动态广场
   ============================================================ */
.feed-grid { display: flex; flex-direction: column; gap: 18px; }
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.composer-top { display: flex; gap: 12px; }
.composer-top img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.composer textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: var(--surface-2);
  resize: vertical;
  min-height: 60px;
  font-size: 14.5px;
}
.composer textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); background: var(--surface); }
.composer-tools { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.composer-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.composer-tool:hover { border-style: solid; color: var(--primary); border-color: var(--primary); }
.composer-tool input[type=file] { display: none; }
.composer-submit { margin-left: auto; }
.composer-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.composer-previews:empty { display: none; }
.preview-item { position: relative; width: 78px; height: 78px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-remove { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff; border: none; font-size: 13px; line-height: 1; display: grid; place-items: center; }

.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: box-shadow 0.2s;
}
.post:hover { box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.post-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-author { font-size: 14.5px; font-weight: 700; color: var(--text); }
.post-sub { font-size: 12px; color: var(--text-muted); }
.post-time { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.post-body { font-size: 14.5px; color: var(--text); white-space: pre-wrap; word-break: break-word; line-height: 1.7; margin: 0 0 12px; }
.post-media { display: grid; gap: 6px; margin-bottom: 12px; }
.post-media.grid-1 { grid-template-columns: 1fr; max-width: 520px; }
.post-media.grid-2 { grid-template-columns: 1fr 1fr; }
.post-media.grid-3, .post-media.grid-4 { grid-template-columns: 1fr 1fr 1fr; }
.post-media .media-item { border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); cursor: pointer; aspect-ratio: 1; }
.post-media.grid-1 .media-item { aspect-ratio: 16/10; }
.post-media .media-item img, .post-media .media-item video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-media .media-item:hover img { transform: scale(1.04); }

.post-actions { display: flex; gap: 4px; padding-top: 10px; border-top: 1px dashed var(--border); }
.post-comments { margin-top: 12px; padding-top: 8px; display: none; }
.post-comments.show { display: block; }
.comment { display: flex; gap: 9px; padding: 8px 0; }
.comment img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { font-size: 13.5px; color: var(--text); }
.comment-body b { font-weight: 600; color: var(--primary); margin-right: 6px; }
.comment-time { font-size: 11.5px; color: var(--text-muted); margin-left: 6px; }
.comment-box { display: flex; gap: 8px; margin-top: 10px; }
.comment-box input { flex: 1; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); }
.comment-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* ============================================================
   个人中心
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.profile-cover {
  height: 110px;
  background:
    linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 60%, #1a6b64 100%);
  position: relative;
}
.profile-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(217, 119, 6, 0.35), transparent 50%);
}
.profile-avatar-wrap {
  position: relative;
  margin: -48px auto 0;
  width: 96px;
}
.profile-avatar-wrap img {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}
.profile-body { padding: 8px 22px 22px; text-align: center; }
.profile-body h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 900; margin: 10px 0 4px; }
.profile-sign { color: var(--text-muted); font-size: 13px; margin: 0 0 12px; min-height: 18px; }
.profile-cohort { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 11px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-weight: 600; }
.profile-stats { display: flex; justify-content: space-around; padding: 16px 0; border-top: 1px solid var(--border); margin-top: 16px; }
.profile-stats .stat { background: transparent; }
.profile-stats .stat-num { font-size: 18px; }

.profile-form { display: flex; flex-direction: column; gap: 18px; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.form-section h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.form-section .sub { font-size: 12.5px; color: var(--text-muted); margin: 0 0 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.avatar-edit-btns { display: flex; flex-direction: column; gap: 6px; }
.preset-avatars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.preset-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: cover;
  transition: all 0.15s;
}
.preset-avatar:hover { transform: scale(1.1); }
.preset-avatar.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* ============================================================
   管理后台
   ============================================================ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.admin-card h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.admin-card .desc { font-size: 12.5px; color: var(--text-muted); margin: 0 0 14px; }
.admin-stat-row { display: flex; gap: 12px; margin-bottom: 14px; }
.admin-stat { flex: 1; background: var(--bg-soft); border-radius: var(--radius); padding: 14px; text-align: center; }
.admin-stat .num { font-family: var(--font-serif); font-size: 24px; font-weight: 900; color: var(--primary); }
.admin-stat .lbl { font-size: 12px; color: var(--text-muted); }

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.admin-list li:last-child { border-bottom: none; }
.admin-list img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.admin-list .info { flex: 1; min-width: 0; }
.admin-list .name { font-size: 13.5px; font-weight: 600; }
.admin-list .sub { font-size: 11.5px; color: var(--text-muted); }
.admin-add { display: flex; gap: 8px; margin-top: 12px; }
.admin-add input { flex: 1; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.admin-add input:focus { outline: none; border-color: var(--primary); }

.content-mgr-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.content-mgr-item:last-child { border-bottom: none; }
.content-mgr-item .txt { flex: 1; min-width: 0; }
.content-mgr-item .txt strong { font-size: 13.5px; display: block; }
.content-mgr-item .txt span { font-size: 11.5px; color: var(--text-muted); }

/* ============================================================
   模态框
   ============================================================ */
.modal-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 30, 28, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: auto;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 700; margin: 0; }
.modal-body { padding: 20px 22px; }
.modal-body .field { margin-bottom: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ============================================================
   Toast
   ============================================================ */
.toast-wrap { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 11px 20px;
  background: var(--primary-700);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90vw;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.show { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 24px;
  display: grid; place-items: center;
}

/* ============================================================
   空状态
   ============================================================ */
.empty { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty svg { width: 56px; height: 56px; opacity: 0.4; margin-bottom: 12px; }
.empty h4 { font-family: var(--font-serif); font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--text-2); }
.empty p { font-size: 13.5px; margin: 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .qa-layout, .profile-grid { grid-template-columns: 1fr; }
  .qa-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .qa-aside .aside-block { flex: 1; min-width: 240px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar-inner { padding: 0 14px; gap: 8px; }
  .menu-toggle { display: inline-flex; }
  .topnav {
    position: fixed;
    top: 0; left: 0;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    padding: 80px 18px 24px;
    gap: 4px;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 60;
    box-shadow: var(--shadow-lg);
  }
  .topnav.open { transform: translateX(0); }
  .topnav .nav-item { width: 100%; padding: 12px 14px; font-size: 15px; }
  .nav-item span { display: inline; }
  .overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  .overlay.show { opacity: 1; pointer-events: auto; }
  .user-name { display: none; }
  .main { padding: 18px 14px 92px; }
  .page-head h2 { font-size: 24px; }
  .qa-aside { flex-direction: column; }
  .bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    z-index: 50;
  }
  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.15s;
  }
  .bn-item.active { color: var(--primary); }
  .bn-item svg { width: 22px; height: 22px; }
  .post-media.grid-3, .post-media.grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 761px) {
  .bottom-nav { display: none; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* 选中文本 */
::selection { background: var(--accent-soft); color: var(--text); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
