:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2937;
  --text-2: #6b7280;
  --primary: #185fa5;
  --primary-2: #1d7fd6;
  --border: #e5e7eb;
  --green: #0f6e56;
  --amber: #b45309;
  --gray: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

/* 顶栏 */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar.admin { background: #0f2a47; }
.topbar.admin .brand, .topbar.admin .nav a, .topbar.admin .who { color: #e8f0fb; }
.topbar.admin .nav a:hover { color: #fff; }
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { font-weight: 600; font-size: 16px; color: var(--text); }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--text-2); font-size: 14px; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { font-size: 13px; color: var(--text-2); }
.admin-entry { font-size: 13px; color: #2563eb; border: 1px solid #2563eb; padding: 4px 10px; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.admin-entry:hover { background: #2563eb; color: #fff; }
.link { font-size: 13px; color: var(--primary); cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.link.danger { color: #c0392b; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row > span:first-child { min-width: 48px; color: var(--text-2); font-size: 14px; }
.captcha-box { display: inline-flex; cursor: pointer; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; line-height: 0; }
.captcha-box svg { display: block; }

/* 布局 */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.container.narrow { max-width: 720px; }
.center { text-align: center; }
.page-title { font-size: 22px; font-weight: 600; margin: 0 0 20px; }
.section-title { font-size: 16px; margin: 28px 0 12px; }
.section-title .reg-total { color: var(--text-2); font-weight: 400; }

/* 已报名同事列表 */
.registrants { margin-top: 8px; }
.reg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.reg-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
}
.reg-name { font-weight: 600; color: var(--text); }
.reg-dept { color: var(--text-2); font-size: 13px; }
.reg-time { margin-left: auto; color: var(--text-2); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 4px; }
.pager-btn {
  display: inline-block; padding: 6px 14px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--primary); text-decoration: none; font-size: 13px;
}
.pager-btn:hover { background: #eef3ff; text-decoration: none; }
.pager-info { color: var(--text-2); font-size: 13px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head .page-title { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--text-2); font-size: 14px; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { text-decoration: none; border-color: #cbd5e1; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-cover {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #e8eef6;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-ph { color: #9aa7b8; font-size: 15px; }
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
}
.badge-upcoming { background: #1d7fd6; }
.badge-ongoing { background: var(--green); }
.badge-ended { background: var(--gray); }
.badge-internal { background: #6d28d9; }
.card-body { padding: 14px 16px; }
.card-title { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
.card-meta { font-size: 13px; color: var(--text-2); margin: 0 0 12px; }
.card-audience { font-size: 13px; color: var(--primary); margin: -4px 0 12px; line-height: 1.5; }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.slots { color: var(--text-2); }
.slots b { color: var(--primary); }

/* 状态标签 */
.status { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.status-upcoming { background: #e6f1fb; color: var(--primary); }
.status-ongoing { background: #e1f5ee; color: var(--green); }
.status-ended { background: #eef0f3; color: var(--gray); }
.status-public { background: #e6f1fb; color: var(--primary); }
.status-internal { background: #f1ebfb; color: #6d28d9; }

/* 详情页 */
.detail-cover {
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #e8eef6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.detail-title { font-size: 24px; margin: 0 0 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.prose { font-size: 15px; }
.prose p { margin: 0 0 12px; }

/* 富文本编辑器 */
.rich-editor { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.re-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #f6f8fb; border-bottom: 1px solid var(--border); }
.re-toolbar .re-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.re-toolbar button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 13px; cursor: pointer; color: var(--text); min-width: 34px; }
.re-toolbar button:hover { background: #eef3fb; border-color: var(--primary); }
.re-toolbar button:disabled { opacity: .5; cursor: default; }
.re-toolbar .re-source-btn { margin-left: auto; color: var(--primary); }
.re-content { min-height: 220px; max-height: 520px; overflow: auto; padding: 14px; outline: none; font-size: 15px; line-height: 1.7; }
.re-content:focus { box-shadow: inset 0 0 0 2px rgba(56,135,255,.15); }
.re-source { display: none; width: 100%; min-height: 220px; border: 0; padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; resize: vertical; outline: none; box-sizing: border-box; }
.rich-editor.re-source-mode .re-content { display: none; }
.rich-editor.re-source-mode .re-source { display: block; }
.hint { font-size: 12px; color: var(--text-2); margin-top: 6px; }

/* 富文本：文字颜色选择 */
.re-color { display: inline-flex; align-items: center; gap: 6px; }
.re-color-label { position: relative; font-weight: 700; font-size: 15px; color: #343a40; padding: 0 2px; cursor: default; }
.re-color-label .re-color-bar { position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 2px; background: linear-gradient(90deg,#e03131,#f08c00,#2f9e44,#1971c2,#6741d9); }
.re-swatches { display: inline-flex; align-items: center; gap: 4px; }
.re-swatch { width: 20px; height: 20px; padding: 0; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.re-swatch:hover { transform: scale(1.12); border-color: var(--primary); }
.re-swatch.re-clear { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #495057; font-size: 12px; }
.re-custom { position: relative; display: inline-flex; width: 20px; height: 20px; margin: 0; cursor: pointer; overflow: hidden; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); }
.re-custom input[type="color"] { position: absolute; inset: -4px; width: 200%; height: 200%; border: 0; padding: 0; cursor: pointer; opacity: 0; }
.re-custom .re-swatch-custom { position: absolute; inset: 0; border: 0; }

/* 富文本正文渲染（活动详情页） */
.prose { word-break: break-word; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.2em 0 .6em; line-height: 1.3; }
.prose h1 { font-size: 22px; }
.prose h2 { font-size: 19px; }
.prose h3 { font-size: 17px; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose img { display: block; width: 100%; height: auto; border-radius: 10px; margin: 12px 0; border: 1px solid var(--border); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 12px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 4px solid var(--primary); background: #f6f8fb; color: var(--text-2); border-radius: 0 8px 8px 0; }
.prose code { background: #f0f2f5; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.prose pre { background: #1f2430; color: #e6e6e6; padding: 12px 14px; border-radius: 8px; overflow: auto; }
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.agenda { margin-top: 24px; }
.agenda h2 { font-size: 17px; margin: 0 0 12px; }
.agenda ul { list-style: none; padding: 0; margin: 0; }
.agenda li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.agenda li .t { color: var(--primary); font-weight: 600; min-width: 56px; }
.detail-actions { margin-top: 26px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text); }
.form input, .form textarea, .form select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.form textarea { resize: vertical; }
.form .row { display: flex; gap: 14px; }
.form .row label { flex: 1; }
.form-actions { display: flex; gap: 12px; margin-top: 4px; }

/* 行内勾选项（如后台「启动报名」） */
.form label.checkbox-line { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.form label.checkbox-line input { width: auto; padding: 0; margin: 0; }

/* 上传图片预览 */
.img-preview { position: relative; display: inline-block; margin-top: 8px; }
.img-preview img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.img-preview .keep { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.img-preview-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* 详情页图片画廊 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 8px 0 6px; }
.gallery img { width: 100%; border-radius: 10px; border: 1px solid var(--border); }

.callout {
  background: #e6f1fb;
  border: 1px solid #b5d4f4;
  color: #0c447c;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}
.callout.err { background: #fcebed; border-color: #f7c1c1; color: #a32d2d; }
/* 管理员预览提示 */
.callout.admin-note { background: #fff7e6; border-color: #ffe1a8; color: #8a5a00; }

/* 后台子标题（评论管理分区） */
.sub-title { margin: 26px 0 12px; font-size: 16px; font-weight: 600; color: var(--text-1); }

/* 评论数徽标（待审） */
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.badge-pending { background: #fef3c7; color: #b45309; }
.cmt-cell { white-space: nowrap; }

/* 模拟登录列表 */
.mock-list { display: flex; flex-direction: column; gap: 12px; }
.mock-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.mock-item:hover { border-color: var(--primary); text-decoration: none; }
.mock-item span { font-size: 13px; color: var(--text-2); }

/* 成功页 */
.ok {
  width: 64px; height: 64px; line-height: 64px;
  margin: 10px auto 16px;
  border-radius: 50%;
  background: var(--green); color: #fff; font-size: 32px;
}

/* 统计 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 8px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.stat b { display: block; font-size: 26px; color: var(--primary); }
.stat span { font-size: 13px; color: var(--text-2); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #fafbfc; color: var(--text-2); font-weight: 500; }
.table tr:last-child td { border-bottom: none; }
.table .ops { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

/* 报名状态徽章（员工/后台通用） */
.status-pending { background: #fdf0e0; color: #b45309; }
.status-approved { background: #e1f5ee; color: #0f6e56; }
.status-waitlist { background: #e6f1fb; color: #185fa5; }
.status-cancelled { background: #eef0f3; color: #6b7280; }

/* 行内表单（取消/审核按钮） */
.inline-form { display: inline; }
.inline-form + .inline-form { margin-left: 6px; }

/* 详情页操作区 */
.detail-actions { margin-top: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 筛选标签 */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-tabs .tab {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.filter-tabs .tab:hover { text-decoration: none; border-color: #cbd5e1; color: var(--text); }
.filter-tabs .tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 提示框（如复制活动说明） */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; line-height: 1.7; margin-bottom: 18px; border: 1px solid transparent; }
.alert-info { background: #e7f1ff; border-color: #b6d4fe; color: #0b4a8f; }
.alert-info strong { color: #0a5bbd; }
.alert-err { background: #fcebed; border-color: #f7c1c1; color: #a32d2d; }
.alert-err strong { color: #8a1f1f; }

/* 看板 KPI（六宫格） */
.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 22px; }

/* 看板面板 */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.chart-donut { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text); }
.legend.inline { flex-direction: row; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.legend .dot, .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }

@media (max-width: 640px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form .row { flex-direction: column; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== 移动端顶栏响应式 ===================== */
/* 默认顶栏为单行 flex 且固定 56px 高度，窄屏放不下会导致内容竖叠挤压。
   移动端改为：第一行「品牌 + 用户信息」，第二行「导航链接均分横排」。 */
@media (max-width: 768px) {
  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 14px;
    gap: 8px;
    align-items: center;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .user {
    order: 2;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
  }
  .who {
    font-size: 12px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-entry { padding: 3px 8px; font-size: 12px; }
  .link { font-size: 12px; }
  .nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    gap: 4px;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    justify-content: space-around;
  }
  .nav a {
    flex: 1 1 0;
    text-align: center;
    white-space: nowrap;
    font-size: 13px;
    padding: 4px 2px;
  }
}

/* 我的报名：移动端表格转卡片，避免窄屏挤压导致状态文字竖排 */
@media (max-width: 768px) {
  .my-table, .my-table thead, .my-table tbody, .my-table tr, .my-table td { display: block; width: 100%; }
  .my-table thead { display: none; }
  .my-table tr { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .my-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: right; }
  .my-table td:last-child { border-bottom: none; }
  .my-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-2); font-size: 13px; font-weight: 500; text-align: left; }
  .my-table td.ops { flex-wrap: wrap; justify-content: flex-end; }
}

/* ===================== 评论区 ===================== */
.comments { margin-top: 34px; border-top: 1px solid var(--border); padding-top: 22px; }
.cmt-count { font-size: 13px; background: var(--primary); color: #fff; border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }
.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 20px; }
.cf-box { position: relative; }
.cf-input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 14px; resize: vertical; box-sizing: border-box; }
.emoji-btn { position: absolute; right: 10px; bottom: 10px; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.emoji-btn:hover { border-color: var(--primary); }
.cf-media { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.cf-file { font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.cf-file input { font-size: 12px; }
.cf-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

.comment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.c-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; flex: 0 0 42px; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 18px; font-weight: 600; }
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-body { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-name { font-weight: 600; font-size: 14px; }
.c-dept { font-size: 12px; color: var(--text-2); }
.c-badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.c-badge.joined { background: #e1f5ee; color: var(--green); }
.c-badge.notjoined { background: #fef3c7; color: #b45309; }
.c-time { font-size: 12px; color: var(--text-2); margin: 2px 0 6px; }
.c-content { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.c-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.c-images .c-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.c-video { width: 100%; max-width: 300px; border-radius: 8px; border: 1px solid var(--border); margin-top: 8px; }

/* 表情面板 */
.emoji-panel { display: none; position: absolute; right: 0; bottom: 46px; width: 300px; max-height: 244px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); z-index: 20; }
.emoji-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); }
.emoji-tab { border: none; background: none; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; }
.emoji-tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; }
.emoji-item { font-size: 20px; text-align: center; cursor: pointer; border-radius: 6px; padding: 4px 0; }
.emoji-item:hover { background: #eef3fb; }

/* 灯箱 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: none; align-items: center; justify-content: center; z-index: 100; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

/* 后台导航徽标 */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; background: #c0392b; color: #fff; border-radius: 999px; margin-left: 2px; }

/* 评论审核列表 */
.review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.review-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.ri-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ri-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ri-reason { flex: 1; min-width: 180px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; }
.btn.danger { background: #fff; color: #c0392b; border-color: #f0c0bb; }
.btn.danger:hover { background: #fdecea; }

/* ===================== 报名前安全告知书弹窗 ===================== */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .55); padding: 16px;
}
.modal-mask[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: 14px; overflow: hidden;
  width: 100%; max-width: 680px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-close { border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: #94a3b8; padding: 0 4px; }
.modal-close:hover { color: #475569; }
.modal-frame { flex: 1 1 auto; width: 100%; border: none; min-height: 340px; background: #fff; }
.modal-body { padding: 16px 18px; }
.modal-body .muted { display: block; margin-bottom: 8px; }
.reason-input {
  width: 100%; min-height: 96px; resize: vertical; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; line-height: 1.6; font-family: inherit; color: var(--text); background: #fff;
}
.reason-input:focus { outline: none; border-color: #0b3d91; box-shadow: 0 0 0 3px rgba(11, 61, 145, .12); }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.countdown-tip { font-size: 13px; color: #64748b; }
.countdown-tip b { color: #0b3d91; font-size: 15px; }
  .modal-actions { display: flex; gap: 10px; }
#notice-confirm:disabled { opacity: .55; cursor: not-allowed; }

/* ===================== 统一审批页 ===================== */
.count-pill {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px;
  background: #eef2f7; color: var(--text-2); vertical-align: middle;
}
.count-pill-warn { background: #fef3c7; color: #b45309; }
.approve-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 18px; overflow: hidden;
}
.approve-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: #f7f9fc;
  flex-wrap: wrap;
}
.approve-group-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.approve-group-title h2 { font-size: 16px; margin: 0; color: var(--text); }
.approve-table .op-col { white-space: nowrap; }
.approve-table .cell-name { font-weight: 600; color: var(--text); }
.approve-table .cell-remark { color: var(--text-2); max-width: 220px; }
.approve-table .ops { display: flex; gap: 8px; align-items: center; }
.empty-state {
  text-align: center; padding: 60px 20px; background: var(--surface);
  border: 1px dashed var(--border); border-radius: 14px; color: var(--text-2);
}
.empty-icon {
  width: 56px; height: 56px; line-height: 56px; margin: 0 auto 14px;
  font-size: 28px; border-radius: 50%; background: #e1f5ee; color: var(--green);
}
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 6px; }

@media (max-width: 768px) {
  .modal-box { max-height: 92vh; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-actions { justify-content: flex-end; }
  .countdown-tip { text-align: center; }
  .approve-group-head { padding: 12px 14px; }
  .approve-table thead { display: none; }
  .approve-table, .approve-table tbody, .approve-table tr, .approve-table td { display: block; width: 100%; }
  .approve-table tr { border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .approve-table tr:last-child { border-bottom: none; }
  .approve-table td { padding: 3px 0; border: none; }
  .approve-table .cell-remark { max-width: none; }
  .approve-table .ops { padding-top: 8px; }
}
