/* 支持论坛与审核台的样式。
 *
 * 只用 site.css 已经定义好的令牌（--surface / --line / --cta-bg / --radius …），
 * 不新增颜色，也不覆盖既有类——保持「颗粒雾灰」的一致气质。
 */

/* ───────────────────────── 表单 ───────────────────────── */

.forum { margin-top: 8px; }

.forum-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(20px, 3.4vw, 28px);
  display: grid;
  gap: 18px;
}

.field { display: grid; gap: 7px; }

.field > label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.field .hint { font-size: 12.5px; line-height: 1.6; color: var(--text-dim); }

.field input[type="text"],
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 13px;
}

.field textarea { min-height: 148px; resize: vertical; }

.field input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--text-dim);
  max-width: 100%;
}

/* 蜜罐：藏起来且不可聚焦、不进 tab 序、对读屏器隐藏。人填不到，脚本会填。 */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.forum-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--cta-bg);
  color: var(--cta-text);
}
.btn:hover { opacity: 0.88; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn.small { font-size: 13px; padding: 7px 14px; }

/* ───────────────────────── 提示条 ───────────────────────── */

.notice {
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.7;
}
.notice[hidden] { display: none; }
.notice.err { border-left-color: currentColor; }

/* 查看凭证：等宽、可换行、方便整段选中复制 */
.ticket {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  user-select: all;
}

/* ───────────────────────── 帖子 ───────────────────────── */

.threads { display: grid; gap: 16px; margin-top: 24px; }

.thread {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
}

.thread-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}

.thread-who { font-size: 14.5px; font-weight: 500; letter-spacing: 0.03em; }
.thread-when { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* 用户文本一律 textContent 赋值，换行靠 pre-wrap 保留，不拼 innerHTML。 */
.thread-body,
.reply-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

.thread-img {
  margin-top: 14px;
  max-width: 340px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.thread-img img { display: block; width: 100%; height: auto; }

.replies { margin-top: 16px; display: grid; gap: 12px; }

.reply {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 14px;
}
.reply-who {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.pill {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.empty { font-size: 14.5px; color: var(--text-dim); padding: 18px 0; }

/* ───────────────────────── 审核台 ───────────────────────── */

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.admin-bar input[type="password"] {
  font: inherit;
  font-size: 14px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  min-width: min(340px, 100%);
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab {
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 999px;
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
}
.tab[aria-selected="true"] { background: var(--cta-bg); color: var(--cta-text); border-color: transparent; }

.thread-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.reply-box { margin-top: 14px; display: grid; gap: 8px; }
.reply-box textarea {
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  min-height: 80px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.stat-grid { display: grid; gap: 26px; }
@media (min-width: 820px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

.stat-grid h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

.stat-grid table { min-width: 0; }
.stat-grid td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-grid .tablewrap { margin-top: 0; }

.admin-note {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
