:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #e5e7eb;
  --deep: #183059;
  --accent: #9a6b2f;
  --soft: #f6f8fb;
  --danger: #b91c1c;
  --success: #166534;
  --warn: #9a3412;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--soft);
}
a { color: inherit; text-decoration: none; }
.admin-header {
  min-height: 76px;
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; color: var(--muted); font-size: 13px; }
.admin-header a { color: var(--deep); font-weight: 700; }
.admin-shell { width: min(1280px, calc(100% - 36px)); margin: 36px auto; }
.login-card, .dashboard, .editor-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(23,32,51,.08);
}
.login-card { max-width: 480px; padding: 34px; margin: 70px auto; }
h1, h2 { margin: 0 0 10px; color: var(--deep); }
p { color: var(--muted); }
form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
input, textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input { height: 46px; }
textarea { resize: vertical; min-height: 48px; }
button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 0 18px;
}
button:disabled { opacity: .55; cursor: not-allowed; }
button.ghost { background: #eef2f7; color: var(--deep); }
.status { min-height: 22px; color: var(--danger); margin: 0; white-space: pre-wrap; }
.status.ok { color: var(--success); }
.dashboard { padding: 28px; }
.dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dashboard-head p { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; }
.dashboard-head small { color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tab { background: #eef2f7; color: var(--deep); border-radius: 999px; }
.tab.active { background: var(--deep); color: #fff; }
.panel { display: none; }
.panel.active { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.summary-grid article { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.summary-grid span { display: block; font-size: 30px; font-weight: 800; color: var(--deep); }
.summary-grid small { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 980px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { background: #f8fafc; color: var(--deep); }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.badge.pending { background: #fff7ed; color: var(--warn); }
.badge.approved { background: #dcfce7; color: var(--success); }
.badge.rejected { background: #fee2e2; color: var(--danger); }
.badge.need_more_info { background: #e0f2fe; color: #075985; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.row-actions .approve { background: var(--success); }
.row-actions .reject { background: var(--danger); }
.editor-card { padding: 24px; box-shadow: none; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-title p { margin: 0; }
.editor-form fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.editor-form legend { color: var(--deep); font-weight: 800; padding: 0 8px; }
.three-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field-stack { display: grid; gap: 12px; }
.field-stack label { display: grid; gap: 6px; }
pre.inline-json { max-width: 420px; max-height: 160px; overflow: auto; white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0; font-size: 12px; color: #334155; }
.material-list { display: grid; gap: 5px; }
.material-list a { color: #1d4ed8; text-decoration: underline; }
@media (max-width: 760px) {
  .admin-header { align-items: flex-start; }
  .dashboard-head, .admin-header, .section-title { flex-direction: column; align-items: flex-start; }
  .summary-grid, .three-fields { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .summary-grid, .three-fields { grid-template-columns: 1fr; }
}
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  height: 46px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.compact-card { margin-bottom: 18px; }
.editor-card h3 { margin: 0 0 14px; color: var(--deep); }
.spaced-table { margin-top: 18px; }
.copy-link { min-width: 72px; }
.mono-link { max-width: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; color: #1d4ed8; }
.level-select, .status-select { min-width: 120px; }
.login-methods { display: flex; gap: 8px; margin-bottom: 14px; }
.login-methods button { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: var(--deep); }
.login-methods button.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.invite-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ==================== 内容系统与校友中心（V1 追加） ==================== */
.inline-check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; flex-direction: row; }
.inline-check input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-inline input { min-width: 280px; }
.pagination-row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pagination-row button { min-height: 34px; padding: 0 14px; font-size: 13px; background: #eef2f7; color: var(--deep); }
.pagination-row button.active { background: var(--deep); color: #fff; }
.pagination-row button:disabled { opacity: .45; }
.badge.registered { background: #dcfce7; color: var(--success); }
.badge.cancelled { background: #fee2e2; color: var(--danger); }
.badge.checked_in { background: #dbeafe; color: #1d40af; }
.badge.draft { background: #f1f5f9; color: #64748b; }
.editor-form .three-fields input[type="datetime-local"] { min-width: 0; }

/* 富文本正文编辑器 */
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f4f6fa; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.rich-toolbar button { padding: 6px 10px; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--deep); line-height: 1.2; }
.rich-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.rich-editor { min-height: 220px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 12px 12px; font-size: 15px; line-height: 1.8; color: #2b3648; outline: none; }
.rich-editor:focus { border-color: var(--accent); }
.rich-editor img { max-width: 100%; border-radius: 10px; margin: 8px 0; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #9aa3b2; pointer-events: none; }
/* 弹窗（签到二维码等） */
.modal-overlay[hidden] { display: none; }
.modal-overlay { position: fixed; inset: 0; background: rgba(10,16,28,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: #fff; border-radius: 16px; padding: 26px; max-width: 440px; width: 100%; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.modal-card h3 { margin: 0 0 8px; }
.modal-card p { margin: 0 0 14px; color: #6b7280; font-size: 14px; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: #6b7280; }
.qr-box { display: flex; justify-content: center; padding: 10px 0 14px; }
.qr-box img { width: 260px; height: 260px; border: 1px solid #e5e7eb; border-radius: 12px; }
.mono-link { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; font-size: 12px; word-break: break-all; color: #374151; margin-bottom: 10px; }
