/* 任务派发与表格汇总 · 唯一一份样式表 */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --line: #e2e5e9;
  --line-strong: #cfd4da;
  --text: #1f2328;
  --muted: #6b7280;
  --primary: #1a5fb4;
  --primary-dark: #164e94;
  --danger: #c0392b;
  --ok: #1a7f4b;
  --warn: #a15c00;
  --radius: 10px;

  /* ---- 语义底色（浅色主题）----
     这些颜色原先散落在各处写死，深色主题要能整体换掉，所以提上来。 */
  --ok-bg: #eaf7f0;
  --ok-border: #b6dfc8;
  --ok-text: #14683d;
  --danger-bg: #fdeeec;
  --danger-bg-soft: #fff7f6;
  --danger-border: #eec3bd;
  --danger-text: #99271c;
  --warn-bg: #fdf6e6;
  --warn-border: #edd7a8;
  --warn-text: #8a4e00;
  --neutral-bg: #f4f6f9;
  --neutral-border: #cfd6e0;
  --neutral-text: #55606f;
  --chip-bg: #f2f3f5;
  --subtle-bg: #fafbfc;
  --subtle-bg-2: #fcfcfd;
  --group-head-bg: #f0f2f5;
  --focus-bg: #fffef9;
  --dim: #9aa1a9;
  --on-primary: #ffffff;
  --admin-bg: #eaf2fd;
  --admin-border: #b9d2f0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --video-bg: #000;            /* 视频播放区背景（两种主题都用纯黑） */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-weight: 600; font-size: 15px; letter-spacing: .2px; }

.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--primary); text-decoration: none; }

.whoami { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.whoami .name { color: var(--text); }

.tag {
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.tag-admin { border-color: var(--admin-border); background: var(--admin-bg); color: var(--primary-dark); }
.tag-member { border-color: var(--line-strong); background: var(--chip-bg); }

.mini {
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.mini:hover { border-color: var(--primary); color: var(--primary); }
.link-btn { background: none; border: none; color: var(--muted); }
.link-btn:hover { color: var(--primary); text-decoration: underline; }

.inline { display: inline; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }

h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.hint { color: var(--muted); margin: 0 0 20px; font-size: 13px; }
.hint.small { font-size: 12px; margin-top: 14px; }
.warn-text { color: var(--warn); }

.foot {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  padding: 24px 0 40px;
}

/* ---------- 提示条 ---------- */
.flash-area { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.flash-ok { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok-text); }
.flash-error { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.flash-warning { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn-text); }

/* ---------- 面板与卡片 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel.narrow { max-width: 560px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: inherit;
}
.card:hover { border-color: var(--primary); text-decoration: none; }
.card-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.card-desc { color: var(--muted); font-size: 12.5px; }
.card-state { margin-top: 10px; font-size: 12px; color: var(--muted); }
.card.done .card-state { color: var(--ok); }
.card.todo { opacity: .72; }
.card.todo:hover { border-color: var(--line); }

/* ---------- 表单 ---------- */
label { display: block; margin-bottom: 12px; }
label > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

input[type=text], input[type=password], input[type=email], input[type=number], select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--primary); }

.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row label { margin-bottom: 0; min-width: 140px; flex: 1 1 140px; }
.form-row button { flex: 0 0 auto; }

/* 次要按钮（描边式）。
   ⚠️ 这个类原先在样式表里**没有任何定义**，全靠浏览器默认按钮样式撑着 ——
   深色主题下就变成「白字 + 浏览器默认浅灰底」，字根本看不见。
   这里补上完整定义，并用变量做两套主题的自适应。 */
.btn {
  display: inline-block;
  padding: 9px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
  padding: 9px 20px;
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary);
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.mini-input {
  width: 96px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  margin-left: 6px;
}

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12.5px; background: var(--subtle-bg); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .strong { font-weight: 600; }
.row-off td { color: var(--dim); }
.ops { white-space: nowrap; }
.ops select { width: auto; padding: 3px 6px; font-size: 12px; }

.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv th { text-align: left; color: var(--muted); font-weight: 400; width: 110px; padding: 7px 0; }
.kv td { padding: 7px 0; }

/* ---------- 登录框 ---------- */
.login-box {
  max-width: 380px;
  margin: 48px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 22px;
}
.login-box h1 { margin-bottom: 4px; }
.login-box .hint { margin-bottom: 20px; }
.login-box .btn-primary { width: 100%; margin-top: 4px; }

/* ---------- 数字卡 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.metric-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.metric-value { font-size: 24px; font-weight: 600; line-height: 1.2; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }

/* ---------- 状态标签 ---------- */
.state {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  background: var(--chip-bg);
  color: var(--muted);
  font-weight: 400;
}
.state-submitted, .state-done { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok-text); }
.state-pending { border-color: var(--neutral-border); background: var(--neutral-bg); color: var(--neutral-text); }
.state-overdue, .state-rejected { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.state-overdue_submitted { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn-text); }
/* 无需填写：任务结束了，但不算「完成」，用中性色区分 */
.state-skipped { border-color: var(--neutral-border); background: var(--neutral-bg); color: var(--neutral-text); }
.row-danger td { background: var(--danger-bg-soft); }

/* ---------- 成员勾选 ---------- */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0;
  font-size: 13px;
}
.check-item input { width: auto; }
.check-item em { color: var(--warn); font-style: normal; font-size: 12px; }

/* ---------- 其它 ---------- */
.form-actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; }
.inline-form label { margin-bottom: 0; }
.upload-row { margin-top: 14px; }
.history { margin-top: 16px; }
.history summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.pre-wrap { white-space: pre-wrap; max-width: 420px; }
.badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 10px;
  background: var(--danger);
  color: var(--on-primary);
  font-size: 11px;
  line-height: 17px;
  text-align: center;
}
ul.tight { margin: 6px 0 0; padding-left: 20px; }
ul.tight li { margin-bottom: 4px; }
.center { text-align: center; }
.center input { width: auto; }
.dim { color: var(--muted); font-size: 12px; }
.scroll-x { overflow-x: auto; }
.tbl.compact td { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.preview-head td { background: var(--subtle-bg); font-weight: 600; }

/* ---------- 批量设置工具条 ---------- */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.bulk-title { font-size: 13px; font-weight: 600; }
.bulk-group { display: inline-flex; align-items: center; gap: 6px; }
.bulk-cap { font-size: 12.5px; color: var(--muted); }
.bulk-group select { width: auto; padding: 3px 6px; font-size: 12px; }
.bulk-count { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.pick-col { width: 34px; text-align: center; }
.pick-col input { width: auto; }

.mini.danger { border-color: var(--danger-border); color: var(--danger); }
.mini.danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.state-deleted { border-color: var(--line-strong); background: var(--chip-bg); color: var(--muted); }

/* ---------- 结果预览 ---------- */
.preview-head-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}
.preview-head-bar label { margin-bottom: 0; }
.preview-head-bar .inline-form { margin: 0; }
.preview-info { margin-left: auto; font-size: 13px; color: var(--muted); }

.preview-scroll {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.preview-table { min-width: 100%; border-collapse: collapse; }
.preview-table td {
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.preview-table thead td {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--subtle-bg);
  font-weight: 600;
  color: var(--text);
}
.preview-table tbody tr:nth-child(even) td { background: var(--subtle-bg-2); }

.pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pager-info { font-size: 13px; color: var(--muted); }
.mini.disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 操作日志 ---------- */
.nowrap { white-space: nowrap; }
.code-block {
  background: var(--subtle-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0 0;
  font-family: var(--font-mono, Consolas, "Courier New", monospace);
  font-size: 12.5px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 任务说明：富文本编辑器 ---------- */
.rich-editor {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--subtle-bg);
}
.editor-toolbar select { width: auto; padding: 3px 6px; font-size: 12px; }
.editor-toolbar button {
  min-width: 28px;
  padding: 3px 7px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.editor-toolbar button:hover { border-color: var(--primary); color: var(--primary); }
.editor-toolbar button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.tb-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--line);
}
.editor-body {
  min-height: 180px;
  max-height: 460px;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}
.editor-body:focus { background: var(--focus-bg); }
.editor-body p { margin: 0 0 8px; }
.editor-body h2 { font-size: 17px; margin: 10px 0 6px; }
.editor-body h3 { font-size: 15px; margin: 8px 0 5px; }
.editor-body h4 { font-size: 14px; margin: 6px 0 4px; }
.editor-body table { border-collapse: collapse; margin: 8px 0; }
.editor-body table td, .editor-body table th {
  border: 1px solid var(--line-strong);
  padding: 5px 8px;
  min-width: 40px;
}
.editor-body img { max-width: 100%; height: auto; }
.editor-body ul, .editor-body ol { margin: 6px 0 8px; padding-left: 22px; }

.editor-popup {
  position: fixed;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  min-width: 220px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.editor-popup-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.editor-popup label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.editor-popup label span { width: 24px; color: var(--muted); font-size: 13px; }
.editor-popup input { width: 80px; }
.editor-popup-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- 任务说明：成员端展示 ---------- */
.notice-box {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle-bg-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.notice-box p { margin: 0 0 8px; }
.notice-box h2 { font-size: 16px; margin: 8px 0 6px; }
.notice-box h3 { font-size: 14.5px; margin: 6px 0 4px; }
.notice-box h4 { font-size: 14px; margin: 6px 0 4px; }
.notice-box table { border-collapse: collapse; margin: 8px 0; }
.notice-box table td, .notice-box table th {
  border: 1px solid var(--line-strong);
  padding: 5px 8px;
}
.notice-box img { max-width: 100%; height: auto; }
.notice-box ul, .notice-box ol { margin: 6px 0 8px; padding-left: 22px; }

.notice-details { margin: 12px 0; }
.notice-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 6px;
}

/* ---------- 任务明细：展开的提交记录 ---------- */
.history-row > td {
  padding: 0 0 12px;
  background: var(--subtle-bg);
}
.history-panel {
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.history-panel .tbl { margin-top: 8px; }
.history-panel .hint { margin-bottom: 0; }

/* ==================== 账号统计 ==================== */
.stats-filter {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.stats-filter label { margin-bottom: 0; }
.stats-filter label.check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  padding-bottom: 8px;
}
.stats-filter label.check input { width: auto; }
.stats-filter select,
.stats-filter input[type=date] { min-width: 140px; }

/* 分组表头：把「任务完成情况」和「提交工作量」两组在视觉上分开 */
.stats-tbl thead tr.group-row th {
  text-align: center;
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
  background: var(--group-head-bg);
  border-bottom: 1px solid var(--line-strong);
  border-left: 3px solid var(--surface);
}
.stats-tbl thead tr.group-row th:first-child { border-left: none; }
.stats-tbl thead tr.group-row th em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}

/* 点表头排序 */
.stats-tbl .sort-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.stats-tbl .sort-link:hover { color: var(--primary); }
.stats-tbl .sort-arrow { font-size: 9px; color: var(--primary); }

.stats-tbl th.num, .stats-tbl td.num { text-align: right; }
.stats-tbl td.num { font-variant-numeric: tabular-nums; }

/* 完成率：满绿、零红、中间黄 —— 一眼扫出谁拖后腿 */
.rate { font-weight: 600; }
.rate-full { color: var(--ok); }
.rate-part { color: var(--warn); }
.rate-zero { color: var(--danger); }
.rejected { color: var(--danger); font-weight: 600; }

.stats-tbl tr.total-row td {
  border-top: 2px solid var(--line-strong);
  font-weight: 600;
  background: var(--subtle-bg);
}
.stats-scroll { overflow-x: auto; }
.tag-gray { border-color: var(--line-strong); background: var(--chip-bg); color: var(--muted); }

/* ==================== 成员上传实时提示（右下角）==================== */
/* 只在管理员页面出现。固定右下角，弹出 5 秒后自动淡出。 */
.live-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
  max-width: 340px;
}
.live-toast {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ok);
  border-radius: 8px;
  padding: 10px 13px 11px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .13);
  animation: live-toast-in .18s ease-out;
}
.live-toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.live-toast-head { font-weight: 600; margin-bottom: 4px; }
.live-toast-body { color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.live-toast-body b { color: var(--text); font-weight: 500; }
.live-toast-body a { color: var(--primary); text-decoration: none; }
.live-toast-body a:hover { text-decoration: underline; }
@keyframes live-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 拖拽上传区 ====================
   形态照「虚线框 + 上传图标 + 两行文案」做。
   配色统一走 ok-* 这套语义变量，于是两套主题各自协调、不用维护两份样式：

       深色主题 → 墨绿底 + 亮绿虚线 + 亮绿小字
       浅色主题 → 浅绿底 + 柔绿虚线 + 深绿小字

   整块区域都可以点（file input 铺满并透明化），也支持把文件拖进来。 */
.dropzone {
  position: relative;
  border: 2px dashed var(--ok-border);
  border-radius: 10px;
  background: var(--ok-bg);
  padding: 24px 18px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.dropzone:hover { border-color: var(--ok); }
.dropzone.dragover {
  border-color: var(--ok);
  border-style: solid;
  transform: scale(1.005);
}
/* 真正的文件选择框藏起来、铺满整块 —— 所以点哪儿都能选文件。
   只作用于 .dz-main-input：文件夹选择那个 input 是隐藏的，不能一起铺满 */
.dropzone input.dz-main-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  color: var(--ok);
}
.dropzone-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}
.dropzone-sub {
  font-size: 12.5px;
  color: var(--ok-text);
  margin-top: 5px;
  line-height: 1.6;
}
/* 选中/拖入文件后，把文件名显示出来 */
.dropzone-picked {
  display: none;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ok-text);
}
.dropzone-picked.show { display: block; }


/* ==================== 深色主题 ====================
   由右上角的主题选择器控制：<html data-theme="dark"> 时生效。
   只覆盖变量，不改任何具体规则 —— 所以两套主题的布局、间距完全一致。 */
:root[data-theme="dark"] {
  --bg: #16181c;
  --surface: #1e2126;
  --line: #2f333a;
  --line-strong: #3d434c;
  --text: #e6e8eb;
  --muted: #9aa2ad;
  --primary: #4d94ff;
  --primary-dark: #7ab0ff;
  --danger: #ff7a6b;
  --ok: #56d68a;
  --warn: #f0b429;

  --ok-bg: #15301f;
  --ok-border: #2d5c3d;
  --ok-text: #7fe0a6;
  --danger-bg: #3a1e1a;
  --danger-bg-soft: #2a1815;
  --danger-border: #6d3028;
  --danger-text: #ff9d90;
  --warn-bg: #33280f;
  --warn-border: #5c4718;
  --warn-text: #f5cd6b;
  --neutral-bg: #23262b;
  --neutral-border: #3a3f47;
  --neutral-text: #a8b0ba;
  --chip-bg: #24272d;
  --subtle-bg: #20232a;
  --subtle-bg-2: #1b1e23;
  --group-head-bg: #262a31;
  --focus-bg: #2a271d;
  --dim: #79818c;
  --on-primary: #ffffff;
  --admin-bg: #1b2b45;
  --admin-border: #2f4a75;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45);
  --video-bg: #000;            /* 视频播放区背景（两种主题都用纯黑） */
}

/* 深色下的几处补充：浅色主题里靠"白底"撑开的地方，深色要换成深底 */
:root[data-theme="dark"] body { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] .tbl th,
:root[data-theme="dark"] .preview-head td { color: var(--muted); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #16191e;
  color: var(--text);
  border-color: var(--line-strong);
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #6b7480; }
:root[data-theme="dark"] .btn-primary { color: var(--on-primary); }
:root[data-theme="dark"] img { opacity: .92; }
:root[data-theme="dark"] ::-webkit-scrollbar-track { background: #1b1e23; }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3d434c; }

/* ==================== 主题选择器（右上角）==================== */
/* margin-left:auto 让它在「未登录」（顶栏里没有 whoami 那块）时也能靠右；
   登录后剩余空间已被 .whoami 吃掉，这条不生效，两者自然并排靠右。 */
.theme-picker { position: relative; display: inline-block; margin-left: auto; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12.5px;
  cursor: pointer;
  line-height: 1.6;
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 132px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  padding: 4px;
  display: none;
  z-index: 60;
}
.theme-menu.open { display: block; }
.theme-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}
.theme-menu button:hover { background: var(--chip-bg); }
.theme-menu button[aria-checked="true"] { color: var(--primary); font-weight: 600; }
.theme-menu button[aria-checked="true"]::after { content: "✓"; font-size: 12px; }


/* ==================== 多 sheet 配置页的「工作表切换标签」==================== */
.sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  line-height: 1.5;
  transition: border-color .15s, color .15s, background .15s;
}
.sheet-tab:hover { border-color: var(--primary); color: var(--primary); }
/* 当前正在配的那张 */
.sheet-tab.on {
  border-color: var(--primary);
  background: var(--admin-bg);
  color: var(--primary-dark);
  font-weight: 500;
}
.sheet-tab .tab-flag {
  font-size: 11.5px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-text);
}


/* ==================== 个人博客：Word 文档在线预览 ====================
   mammoth 把 .docx 转成 HTML 后塞进这里。
   不接管样式的话，Word 里的表格会挤成一坨、段落没有间距。 */
.doc-view {
  margin-top: 14px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  /* 长文档读起来舒服一点：限制行宽 */
  max-width: 900px;
  line-height: 1.85;
  font-size: 14px;
  color: var(--text);
  overflow-x: auto;
}
.doc-view p { margin: 0 0 12px; }
.doc-view h1, .doc-view h2, .doc-view h3 {
  margin: 20px 0 10px; line-height: 1.4; font-weight: 500;
}
.doc-view h1 { font-size: 20px; }
.doc-view h2 { font-size: 17px; }
.doc-view h3 { font-size: 15px; }
.doc-view table {
  border-collapse: collapse; margin: 12px 0; font-size: 13px;
}
.doc-view td, .doc-view th {
  border: 1px solid var(--line); padding: 5px 9px; vertical-align: top;
}
.doc-view img { max-width: 100%; height: auto; }
.doc-view ul, .doc-view ol { padding-left: 22px; margin: 0 0 12px; }
.doc-view blockquote {
  margin: 12px 0; padding: 8px 14px;
  border-left: 3px solid var(--line-strong); color: var(--muted);
}

/* ---------- 拖拽区增强：多文件 / 文件夹 / 拖拽中的提示 ---------- */

/* 多文件时回显会换行，别把区撑得太高 */
.dropzone-picked {
  white-space: pre-wrap;
  word-break: break-all;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* 「或选择整个文件夹」—— 放在拖拽区下面，单独一行小按钮 */
.dz-folder-row {
  margin-top: 8px;
  text-align: center;
}
.dz-folder-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
}
.dz-folder-btn:hover { color: var(--ok-text); border-color: var(--ok-border); }
/* 文件夹选择用的隐藏 input（不参与布局） */
.dz-folder-input { display: none; }

/* 拖拽悬停时给一句更强的提示 */
.dropzone.dragover .dropzone-main::after {
  content: " —— 松开即可上传";
  color: var(--ok);
}


/* ==================== 个人博客：图片 / 视频 / 表格预览 ==================== */

/* 图片：居中、限高，点开看原尺寸 */
.img-view {
  margin-top: 12px;
  padding: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.img-view img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
}

/* 视频：黑底，占满宽度 */
.video-view {
  margin-top: 12px;
  background: var(--video-bg);
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}
.video-view video {
  width: 100%;
  max-height: 72vh;
  display: block;
}

/* 表格预览：内容可能很宽 —— 允许横向滚动，单元格别把表撑爆 */
.sheet-tbl { font-size: 13px; }
.sheet-tbl th, .sheet-tbl td {
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 个人博客：PPTX 文字预览 ==================== */
.slide-card {
  margin: 10px 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  max-width: 900px;
}
.slide-no {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.slide-body p {
  margin: 0 0 6px;
  line-height: 1.75;
  font-size: 14px;
  color: var(--text);
}
.slide-body p:last-child { margin-bottom: 0; }

/* ==================== 登录页：安全确认区 + 表单锁定态 ==================== */

/* 提示区：用 warn 色系，和系统里其它警示块保持一套语言 */
.sec-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  background: var(--warn-bg);
}
.sec-notice-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--warn-text);
}
.sec-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--warn-text);
  cursor: pointer;
  user-select: none;
}
.sec-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  cursor: pointer;
  accent-color: var(--warn);
}

/* 未勾选时的锁定态：输入框 + 按钮统一变灰，鼠标显示"禁止" */
.form-locked input:not([type="hidden"]),
.form-locked button {
  background: var(--neutral-bg);
  border-color: var(--neutral-border);
  color: var(--dim);
  cursor: not-allowed;
}
.sec-lock-hint {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ==================== 个人空间：待办 ==================== */

.todo-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 14px;
}
.todo-add input[type="text"],
.todo-add #todoTitle {
  flex: 3 1 260px;
  min-width: 0;
}
.todo-add select { flex: 0 0 90px; }
.todo-add input[type="date"] { flex: 0 0 150px; }
.todo-add button { flex: 0 0 auto; }

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--surface);
}
.todo-item:hover { border-color: var(--line-strong); }

/* 勾选框 */
.todo-item .todo-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* 标题做成"看起来像文字、点进去能改"的输入框 */
.todo-item .todo-title {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
}
.todo-item .todo-title:hover { border-color: var(--line); }
.todo-item .todo-title:focus {
  border-color: var(--primary);
  background: var(--focus-bg);
  outline: none;
}

/* 优先级：用颜色区分，一眼看出轻重 */
.todo-item .todo-pri {
  flex: 0 0 auto;
  width: 74px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.todo-pri.pri-high {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-weight: 600;
}
.todo-pri.pri-normal {
  border-color: var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--neutral-text);
}
.todo-pri.pri-low {
  border-color: var(--line);
  background: var(--subtle-bg);
  color: var(--muted);
}

.todo-item .todo-due {
  flex: 0 0 auto;
  width: 145px;
  padding: 3px 6px;
  font-size: 12.5px;
}

/* 「已逾期」标记：没逾期时**占位但不显示**。
   早先用的是 display:none，结果只有逾期那几行多出一块，
   日期框和删除按钮被挤得每行位置都不一样，列表看着就是歪的。
   改成 visibility:hidden 后每行宽度一致，竖着扫下来才齐。 */
.todo-item .todo-overdue {
  display: inline-block;
  visibility: hidden;
  flex: 0 0 auto;
  min-width: 50px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.todo-item.is-overdue .todo-overdue { visibility: visible; }
.todo-item.is-overdue .todo-due {
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* 已完成：整行变淡 + 划掉 */
.todo-item.is-done { opacity: .62; }
.todo-item.is-done .todo-title { text-decoration: line-through; color: var(--muted); }


/* ==================== 个人空间：速记 ==================== */

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.note-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.note-card:focus-within { border-color: var(--primary); }

.note-card .note-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  resize: vertical;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.7;
  min-height: 100px;
  color: var(--text);
}
.note-card .note-input:focus { outline: none; background: var(--focus-bg); }

.note-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  background: var(--subtle-bg);
}
.note-status {
  font-size: 11.5px;
  color: var(--muted);
}
.note-status.is-error { color: var(--danger-text); font-weight: 600; }


/* ==================== 窄屏（手机）==================== */
@media (max-width: 640px) {
  /* 待办：优先级和截止日期换到第二行，标题独占一行 */
  .todo-item { flex-wrap: wrap; row-gap: 6px; }
  .todo-item .todo-title { flex: 1 1 calc(100% - 40px); }
  .todo-item .todo-pri { flex: 1 0 auto; width: auto; }
  .todo-item .todo-due { flex: 1 0 auto; width: auto; }
  .todo-item [data-act="del"] { margin-left: auto; }

  .todo-add input[type="text"],
  .todo-add #todoTitle { flex: 1 1 100%; }
  .todo-add select,
  .todo-add input[type="date"] { flex: 1 1 45%; }
  .todo-add button { flex: 1 1 100%; }

  /* 速记：单列，卡片不挤成两半 */
  .note-grid { grid-template-columns: 1fr; }
}

/* ==================== 个人空间：文件搜索 ==================== */

.search-panel { padding: 12px 16px; }

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.search-form input[type="search"] {
  flex: 1 1 320px;
  min-width: 0;
}

/* 结果里"命中在哪"这一列 */
.search-hit { max-width: 560px; }

.hit-tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--chip-bg);
  color: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}
.hit-tag-body {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.hit-snippet {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  word-break: break-word;
}

/* 关键词高亮：片段里的 <mark> 由后端插入（已先转义，安全） */
.hit-snippet mark {
  background: var(--warn-bg);
  color: var(--warn-text);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 3px;
}

@media (max-width: 640px) {
  .search-form input[type="search"] { flex: 1 1 100%; }
  .search-form button { flex: 1 1 auto; }
  .search-hit { max-width: none; }
}

/* ==================== 成员权限：创建表单里的勾选区 ==================== */
.perm-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1 1 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle-bg);
}
.perm-picker > span:first-child {
  font-size: 13px;
  color: var(--muted);
}
.perm-picker .check-item { margin: 0; }

/* 权限配置表里的勾选框 */
.perm-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==================== 派发页：按组选人 ==================== */
.group-picker { margin-top: 6px; }

.group-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.group-toolbar b { color: var(--primary-dark); font-size: 15px; }

.group-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
/* 组里有人被选上时，整块边框变绿，一眼能看出哪些组参与了本次派发 */
.group-block.has-pick { border-color: var(--ok-border); }

.group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--subtle-bg);
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
}
.group-head input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.group-name { font-weight: 600; }
.group-count { font-size: 12px; color: var(--muted); }
.group-state { margin-left: auto; font-size: 12px; color: var(--ok-text); }

.group-members { padding: 10px 12px 12px; }

@media (max-width: 640px) {
  .group-members .check-item { width: 100%; }
  .group-toolbar .mini { flex: 1 1 auto; }
}

/* ==================== 账号管理页：表单网格 + 紧凑排版 ==================== */

/* 原来用 .form-row（flex-wrap），字段多了会"掉到第二行右边"，
   显得乱七八糟。改成固定 3 列网格，每个字段对齐自己的列。 */
.user-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
}
.user-form > label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  min-width: 0;
}
.user-form > label > span {
  font-size: 12.5px;
  color: var(--muted);
}
.user-form input,
.user-form select { width: 100%; }

/* 与第三列输入框底部对齐的说明文字 */
.user-form-note {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.6;
  padding-top: 23px;
}

.user-form .perm-picker,
.user-form .user-form-actions { grid-column: 1 / -1; }
.user-form-actions { display: flex; gap: 10px; }

/* 权限勾选：从"大块卡片"改成紧凑的小胶囊，一行放得下 */
.perm-picker {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle-bg);
}
.perm-label { font-size: 12.5px; color: var(--muted); }
.perm-label.faint { color: var(--dim); font-size: 11.5px; margin-left: auto; }

.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.perm-chip:hover { border-color: var(--primary); }
.perm-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
}
.perm-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--focus-bg);
}

/* 表格工具类 */
.ctr { text-align: center; }
.nowrap { white-space: nowrap; }
.ops-col { width: 1%; white-space: nowrap; }

/* 行内操作收紧：按钮之间别拉太开，密码框收窄 */
.ops form.inline { margin-right: 4px; }
.ops .mini { padding-left: 8px; padding-right: 8px; }
.ops .mini-input { width: 92px; }
.perm-table td { padding-top: 7px; padding-bottom: 7px; }

/* 派发页人员网格：间距收一半，一屏能看更多人 */
.check-grid { gap: 6px; }
.check-grid .check-item { padding: 7px 10px; font-size: 13px; }

@media (max-width: 900px) {
  .user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-form-note { padding-top: 0; grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .user-form { grid-template-columns: 1fr; }
}

/* ==================== 信息架构：顶部层级 + 模块总览 ==================== */

/* 顶部导航：只显示「模块总览」和当前位置 */
.nav-sep { color: var(--dim); margin: 0 1px; }
.nav-module { color: var(--muted); font-size: 13px; }
.nav-child { color: var(--text); font-size: 13px; font-weight: 600; }
.nav-home.is-on { color: var(--primary); font-weight: 600; }

/* 成员：待办 / 消息 移到右侧，靠红点提示 */
.nav-quick { display: flex; gap: 14px; align-items: center; }
.nav-quick a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-quick a:hover { color: var(--primary); }

/* 四大模块卡片 */
.module-grid {
  display: grid;
  /* 模块导航固定**每行 2 个**（用户要求）。窄屏自动降成 1 列，不然卡片会挤扁。 */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  /* 同一行的卡片强制等高 —— 各模块的二级数量不一样（1~7 个），
     不显式声明的话，一旦有人把这里改成 align-items:start，卡片就会参差不齐 */
  align-items: stretch;
}

@media (max-width: 760px) {
  .module-grid { grid-template-columns: minmax(0, 1fr); }
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s;
}
.module-card:hover { border-color: var(--line-strong); }
.module-card.is-soon { opacity: .75; }

.module-head { display: flex; gap: 12px; align-items: flex-start; }
.module-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: var(--subtle-bg);
  border: 1px solid var(--line);
}
.module-title-wrap { min-width: 0; }
.module-name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.module-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.55;
}

/* 二级模块：一排小胶囊 */
.module-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}
.module-link {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--subtle-bg);
  color: var(--text);
  text-decoration: none;
  transition: .15s;
}
.module-link:hover { border-color: var(--primary); color: var(--primary); }
.module-link.is-soon { color: var(--muted); }

/* 「待开发」标记 */
.soon-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-border);
  font-weight: 600;
  vertical-align: 1px;
}
.soon-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn);
  border-radius: 9px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--warn-text);
  font-size: 13.5px;
  line-height: 1.7;
}
.soon-banner p { margin: 8px 0 0; }

.plain-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 2;
  color: var(--muted);
}
.plain-list strong { color: var(--text); }

@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
  .nav-quick { gap: 10px; }
  .nav-module, .nav-child { font-size: 12px; }
}

/* ==================== 通信基站项目管理 ==================== */

/* 顶部统计条 */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.stat-strip .stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat-strip .stat b { display: block; font-size: 20px; line-height: 1.3; }
.stat-strip .stat span { font-size: 11.5px; color: var(--muted); }

/* 页面里的阶段提示（原文照搬，不加工） */
.stage-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--focus-bg);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--primary);
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  margin: 8px 0 14px;
}
.stage-tip-icon { flex: 0 0 auto; }

/* 七个节点卡片 */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.stage-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: .15s;
}
.stage-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.stage-card.st-card-full { border-left: 3px solid var(--ok); }
.stage-card.st-card-partial { border-left: 3px solid var(--warn); }
.stage-card.st-card-empty { border-left: 3px solid var(--line-strong); }
.stage-card.st-card-na { border-left: 3px solid var(--dim); opacity: .7; }
.stage-card.is-late { border-color: var(--danger-border); background: var(--danger-bg); }

.stage-top { display: flex; align-items: center; justify-content: space-between; }
.stage-no {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
}
.stage-state { font-size: 12px; color: var(--muted); }
.stage-name { font-size: 15px; font-weight: 600; }
.stage-hint { font-size: 12px; color: var(--muted); line-height: 1.55; }
.stage-date { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.stage-date.is-late { color: var(--danger-text); font-weight: 600; }

/* 阶段状态小圆点（列表 / 看板共用） */
.st-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid transparent;
  vertical-align: middle;
}
.st-dot.st-full { background: var(--ok); border-color: var(--ok); }
.st-dot.st-partial {
  background: linear-gradient(90deg, var(--ok) 50%, transparent 50%);
  border-color: var(--ok);
}
/* 空：空心圆 —— 表示"这一格还没填" */
.st-dot.st-empty { background: transparent; border-color: var(--line-strong); }

/* 不涉及：**一条横杠**，不再是空心圆。
   原来它和「空」都是空心圆，只差边框颜色深一点，看板上根本分不出来 ——
   横杠在表格里本来就是"这项没有"的通用写法，和圆圈形状完全不同，一眼能分开。
   另外「不涉及」是"不用管它"，所以故意做得比「空」更淡更细。 */
.st-dot.st-na {
  background: transparent;
  border-color: transparent;
  border-radius: 2px;
  position: relative;
}
.st-dot.st-na::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: var(--dim);
}
.st-dot.is-late {
  box-shadow: 0 0 0 2px var(--danger-bg);
  border-color: var(--danger) !important;
}

.late-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
  font-weight: 600;
}
.ver-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10.5px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* 看板 */
.board-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.board-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.board-table td { padding-top: 7px; padding-bottom: 7px; }
.board-table th { font-size: 11.5px; line-height: 1.35; }
.board-table tr.row-late td { background: var(--danger-bg); }

/* 文件夹区块 */
.folder-block {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 10px;
  overflow: hidden;
}
.folder-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: var(--subtle-bg);
  font-size: 13.5px;
}
.folder-name { font-weight: 600; }
.file-table { font-size: 13px; }
.file-table td { padding: 8px 10px; }

/* 计划设置折叠区 */
.bss-plan summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.bss-plan summary::-webkit-details-marker { display: none; }
.bss-plan summary::before { content: "▸ "; color: var(--dim); }
.bss-plan[open] summary::before { content: "▾ "; }

/* 批量上传的每一行 */
.bulk-row {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--surface);
}
.bulk-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.bulk-idx {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--subtle-bg);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bulk-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.bulk-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-controls select,
.bulk-controls input {
  font-size: 12.5px;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--subtle-bg);
  color: var(--text);
  font-family: inherit;
}
.bulk-controls .bulk-proj { flex: 2 1 220px; min-width: 0; }
.bulk-controls .bulk-type { flex: 1 1 160px; min-width: 0; }
.bulk-controls .bulk-red { flex: 1 1 160px; min-width: 0; }

@media (max-width: 640px) {
  .stage-grid { grid-template-columns: 1fr; }
  .bulk-controls > * { flex: 1 1 100%; }
}

/* ==================== 模块内顶部导航（横向子功能栏） ==================== */

.mod-tabs {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
}
.mod-tabs-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}
.mod-tabs-list { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-tab {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: .15s;
  white-space: nowrap;
}
.mod-tab:hover { background: var(--subtle-bg); color: var(--text); }
.mod-tab.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
}

/* 总览页：模块名后面的箭头 */
.module-go { color: var(--dim); font-size: 17px; vertical-align: -1px; }
a.module-head { text-decoration: none; color: inherit; }
a.module-head:hover .module-name { color: var(--primary); }
a.module-head:hover .module-go { color: var(--primary); }

/* ==================== 项目单页：左侧七节点 + 右侧文件管理 ==================== */

.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.proj-head-stats { display: flex; gap: 18px; }
.proj-head-stats span { font-size: 11.5px; color: var(--muted); text-align: right; }
.proj-head-stats b { display: block; font-size: 18px; color: var(--text); line-height: 1.3; }

/* 视口高度容器：高度由 JS 按"距页面顶部多远"算，不写死像素 */
.sp-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

/* 撑满剩余空间；min-height:0 是关键 —— 没有它，子元素的 overflow 不生效 */
.sp-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
/* 只有 JS 算好高度后才启用"裁切 + 内部滚动"；
   JS 没跑 / 被禁用时退回普通文档流，内容不会被裁掉 */
.sp-page.sp-ready .sp-layout { overflow: hidden; }

/* 左侧：七个节点 */
/* 左侧：固定不动，内容超高时自己内部滚（滚到头也不会把整页带走） */
.sp-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sp-side-title {
  font-size: 11.5px;
  color: var(--dim);
  padding: 2px 8px 8px;
  letter-spacing: .5px;
}
.sp-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 2px;
  transition: .12s;
}
.sp-stage:hover { background: var(--subtle-bg); }
.sp-stage.is-on { background: var(--primary); color: var(--on-primary); }
.sp-stage.is-on .sp-no { color: rgba(255,255,255,.75); }
.sp-stage.is-late:not(.is-on) { background: var(--danger-bg); }
.sp-no { font-size: 11px; color: var(--muted); width: 16px; flex: 0 0 auto; }
.sp-name { flex: 1 1 auto; min-width: 0; }
.sp-stage .st-dot { flex: 0 0 auto; }

/* 右侧：内容区 */
/* 右侧：唯一跟随鼠标滚轮的区域 */
.sp-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  /* ⚠️ 仍然要 auto：滑块只是**看不见**，滚轮/触摸板照样能滚。
     绝不能改成 hidden —— 那样右侧就滚不动了，内容会被截断。 */
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 滚动条隐藏了，就不必再给它留 6px，左右边距恢复对称 */
  padding-right: 0;

  /* 隐藏垂直滚动条（三种写法覆盖各浏览器） */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* 老版 Edge / IE */
}
.sp-main::-webkit-scrollbar { display: none; }   /* Chrome / Edge / Safari */

/* ⚠️ flex 列里的子项默认会被压缩，内容一多就挤成一团 —— 明确禁止 */
.sp-main > * { flex: 0 0 auto; }

/* 滚动条美化：只作用于左侧七节点（右侧的已隐藏） */
.sp-side::-webkit-scrollbar { width: 8px; }
.sp-side::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}
.sp-side::-webkit-scrollbar-track { background: transparent; }
.sp-side { scrollbar-width: thin; }
.sp-main-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sp-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 16px 18px;
}
.sp-block-title { font-size: 14px; margin: 0 0 12px; }
.sp-newfolder { margin-top: 12px; }
.sp-newfolder summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.sp-plan summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.sp-plan summary::-webkit-details-marker { display: none; }
.sp-plan summary::before { content: "▸ "; color: var(--dim); }
.sp-plan[open] summary::before { content: "▾ "; }

@media (max-width: 820px) {
  /* 手机上取消"视口高度 + 独立滚动"，退回整页滚动 */
  .sp-page { height: auto !important; }
  .sp-layout {
    display: block;
    overflow: visible;
    min-height: 0;
  }
  .sp-side {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    height: auto;
    padding: 8px;
    margin-bottom: 12px;
  }
  .sp-main {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }
  .sp-side-title { display: none; }
  .sp-stage {
    flex-direction: column;
    gap: 4px;
    min-width: 76px;
    text-align: center;
    margin-bottom: 0;
  }
  .sp-name { font-size: 11.5px; white-space: nowrap; }
  .proj-head-stats { width: 100%; justify-content: space-between; }
}

/* 导航栏右上角的「操作日志」入口：和「改密码」同级，用一条竖线跟账号操作分开 */
.nav-log-link {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

/* 项目清单的筛选/排序条 */
.bss-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 10px 13px;
  background: var(--subtle-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.bss-filter label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
}
.bss-filter select {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.bss-filter select:focus { outline: none; border-color: var(--primary); }

/* ==================== 基站项目：上传进度条 ==================== */
.bss-up { margin-top: 12px; }
.bss-up-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--subtle-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bss-up-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 4px;
  transition: width .18s linear;
}
.bss-up-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}

/* ==================== 设计模板 ==================== */
.tpl-layout { display: flex; gap: 18px; align-items: flex-start; margin-top: 14px; }
.tpl-side {
  flex: 0 0 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px;
}
.tpl-main { flex: 1 1 auto; min-width: 0; }

.tpl-folder-list { list-style: none; margin: 0; padding: 0; }
.tpl-folder-list li {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px; border-radius: 7px; margin-bottom: 2px;
}
.tpl-folder-list li.is-on { background: var(--primary-weak, rgba(56,139,253,.14)); }
.tpl-folder-list li > a {
  flex: 1 1 auto; display: flex; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tpl-folder-list li:hover { background: var(--subtle-bg); }
.tpl-folder-name { overflow: hidden; text-overflow: ellipsis; }
.tpl-folder-ops { flex: 0 0 auto; display: none; gap: 2px; }
.tpl-folder-list li:hover .tpl-folder-ops { display: flex; }

.tiny-tag {
  font-size: 10.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--subtle-bg); color: var(--muted);
  border: 1px solid var(--line); white-space: nowrap;
}

.tpl-newfolder { margin-top: 12px; font-size: 12.5px; }
.tpl-newfolder summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.tpl-newfolder summary:hover { color: var(--primary); }
.tpl-newfolder form { display: flex; gap: 6px; margin-top: 8px; }
.tpl-newfolder input { flex: 1 1 auto; min-width: 0; font-size: 12.5px; }

.tpl-danger { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

.tpl-main-title { font-size: 16px; margin: 0 0 10px; }
.tpl-note-label { display: block; margin-top: 10px; }
.tpl-note-label > span { font-size: 12.5px; display: block; margin-bottom: 5px; }
.tpl-note-label input { width: 100%; }

.tpl-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 12.5px; }
.tpl-table th, .tpl-table td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tpl-table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.tpl-table tr:hover > td { background: var(--subtle-bg); }
.tpl-history-row > td { background: transparent !important; padding: 0 8px 8px; }
.tpl-history-row details summary { cursor: pointer; padding: 6px 0; }
.tpl-history-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.tpl-history-table td { padding: 5px 8px; border-bottom: 1px dashed var(--line); }

.tpl-dlg {
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  background: var(--surface); color: var(--text); min-width: 360px;
}
.tpl-dlg::backdrop { background: rgba(0,0,0,.55); }
.tpl-dlg h3 { margin: 0 0 12px; font-size: 14px; }


/* ==================== Markdown 渲染区（.md-body）====================
   预览区和阅读页共用这一套样式 —— 它们本来就是同一个渲染结果。
   所有颜色一律走变量，深色模式下自动跟着变。 */
.md-body { color: var(--text); font-size: 14.5px; line-height: 1.78; word-wrap: break-word; }
.md-body > :first-child { margin-top: 0; }
.md-body > :last-child { margin-bottom: 0; }

.md-body h1, .md-body h2, .md-body h3,
.md-body h4, .md-body h5, .md-body h6 {
  margin: 1.5em 0 .6em; line-height: 1.35; font-weight: 600; color: var(--text);
}
.md-body h1 { font-size: 1.62em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md-body h2 { font-size: 1.34em; padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.md-body h3 { font-size: 1.16em; }
.md-body h4 { font-size: 1.04em; }
.md-body h5, .md-body h6 { font-size: 1em; color: var(--muted); }

.md-body p { margin: .75em 0; }
.md-body strong { font-weight: 600; }
.md-body em { font-style: italic; }
.md-body del { color: var(--muted); }
.md-body a { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--admin-border); }
.md-body a:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }

.md-body ul, .md-body ol { margin: .7em 0; padding-left: 1.7em; }
.md-body li { margin: .3em 0; }
.md-body li > ul, .md-body li > ol { margin: .25em 0; }
.md-body li.md-task-item { list-style: none; margin-left: -1.4em; }
.md-body li.md-task-item input { margin-right: .45em; }

.md-body blockquote {
  margin: .9em 0; padding: .1em 0 .1em 1em;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
}
.md-body blockquote p { margin: .4em 0; }

.md-body code {
  font-family: Consolas, "Cascadia Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: .9em; padding: .12em .38em; border-radius: 4px;
  background: var(--chip-bg); border: 1px solid var(--line);
}
.md-body pre.md-code {
  margin: .9em 0; padding: 12px 14px; overflow-x: auto;
  background: var(--subtle-bg); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.md-body pre.md-code code {
  background: none; border: 0; padding: 0; font-size: 12.8px; line-height: 1.6;
  color: var(--text); white-space: pre;
}
.md-body pre.md-code[data-lang]::before {
  content: attr(data-lang); display: block; margin-bottom: 6px;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

.md-body .md-table-wrap { margin: .9em 0; overflow-x: auto; }
.md-body table.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.md-body table.md-table th, .md-body table.md-table td {
  border: 1px solid var(--line); padding: 7px 10px; text-align: left;
}
.md-body table.md-table th { background: var(--group-head-bg); font-weight: 600; }
.md-body table.md-table tbody tr:nth-child(even) { background: var(--subtle-bg); }

.md-body img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.md-body hr { margin: 1.6em 0; border: 0; border-top: 1px solid var(--line-strong); }

/* ==================== Markdown 编辑器（.mdx-*）==================== */

.mdx { display: flex; flex-direction: column; gap: 10px; }

.mdx-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mdx-back { font-size: 12.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.mdx-back:hover { color: var(--primary); }

/* 阅读页头部：主返回是「个人空间」，右边跟一个次要的「全部文章」 */
.mdx-reader-back { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mdx-back-sep { color: var(--dim); font-size: 12px; }
.mdx-back-sub { font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.mdx-back-sub:hover { color: var(--primary); text-decoration: underline; }

.mdx-title {
  flex: 1 1 240px; min-width: 0; font-size: 15px; font-weight: 600;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.mdx-title:focus { outline: none; border-color: var(--primary); background: var(--focus-bg); }

.mdx-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mdx-state.is-dirty { color: var(--warn-text); }
.mdx-state.is-ok { color: var(--ok-text); }
.mdx-state.is-err { color: var(--danger-text); }

.mdx-acts { display: flex; gap: 8px; align-items: center; }

.mdx-tools {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding: 8px 10px; background: var(--subtle-bg);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mdx-group { display: flex; gap: 3px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--line); }
.mdx-group:last-child { border-right: 0; padding-right: 0; margin-right: 0; }
.mdx-tools button {
  font-size: 12px; padding: 4px 8px; line-height: 1.4;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.mdx-tools button:hover { border-color: var(--primary); color: var(--primary); }
.mdx-tools button.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.mdx-modes { margin-left: auto; }

.mdx-panes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  min-height: 62vh;
}
.mdx-panes[data-mode="write"] { grid-template-columns: 1fr; }
.mdx-panes[data-mode="write"] .mdx-preview { display: none; }
.mdx-panes[data-mode="preview"] { grid-template-columns: 1fr; }
.mdx-panes[data-mode="preview"] #mdxInput { display: none; }

#mdxInput {
  width: 100%; min-height: 62vh; resize: vertical;
  padding: 14px 16px; font-size: 13.5px; line-height: 1.75;
  font-family: Consolas, "Cascadia Mono", Menlo, Monaco, "Courier New", monospace;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  tab-size: 2;
}
#mdxInput:focus { outline: none; border-color: var(--primary); }

.mdx-preview {
  min-height: 62vh; max-height: 78vh; overflow-y: auto;
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mdx-preview.md-body { font-size: 13.8px; }

.mdx-empty, .mdx-warn { color: var(--muted); font-size: 12.5px; }
.mdx-warn { color: var(--danger-text); }

.mdx-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}

/* ---- 列表页 ---- */
.mdx-listhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mdx-listhead h2 { margin: 0; }

.mdx-filters { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.mdx-filter {
  font-size: 12.5px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--subtle-bg);
  color: var(--muted); text-decoration: none;
}
.mdx-filter:hover { border-color: var(--primary); color: var(--primary); }
.mdx-filter.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.mdx-list { display: flex; flex-direction: column; margin-top: 10px; }
.mdx-item {
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  padding: 13px 2px; border-bottom: 1px dashed var(--line);
}
.mdx-item:last-child { border-bottom: 0; }
.mdx-item-main { min-width: 0; flex: 1; }
.mdx-item-title { font-size: 14.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.mdx-item-title:hover { color: var(--primary); }
.mdx-item-ex {
  margin: 4px 0 5px; font-size: 12.5px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mdx-item-meta { margin: 0; font-size: 11.5px; color: var(--dim); }
.mdx-item-acts { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.mdx-badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border);
  margin-right: 4px;
}
.mdx-badge.is-draft { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }

/* ---- 阅读页 ---- */
.mdx-reader-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.mdx-reader-acts { display: flex; gap: 8px; align-items: center; }
.mdx-reader-title { margin: 0 0 6px; font-size: 22px; line-height: 1.35; }
.mdx-reader-meta { margin: 0 0 18px; font-size: 12px; color: var(--muted); }
.mdx-reader .md-body { font-size: 15px; }

@media (max-width: 860px) {
  .mdx-panes { grid-template-columns: 1fr; }
  .mdx-modes { margin-left: 0; }
  .mdx-item { flex-direction: column; }
}


/* ==================== 个人空间：侧边栏 + 模块分区（.wb-*）====================
   布局：左 176px 固定导航，右内容区自适应。
   侧边栏 sticky 跟着滚，点击跳锚点，滚动时当前模块自动高亮（脚本在模板末尾）。
   颜色全部走变量 —— 深色主题下不用改任何一行。 */

/* 个人空间用更宽的画布：侧边栏要占一条，1080px 会挤成一条缝 */
body.wb-wide .wrap { max-width: 1340px; }

.wb-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* ---------- 左侧导航 ---------- */
.wb-side {
  position: sticky;
  top: 74px;                        /* 让开顶部固定栏 */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  box-shadow: var(--shadow);
}

.wb-side-h {
  margin: 0 0 10px; padding: 0 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .02em;
}

.wb-nav { display: flex; flex-direction: column; gap: 2px; }

.wb-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; border-radius: 8px;
  font-size: 13px; color: var(--text); text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s;
}
.wb-nav-item:hover { background: var(--subtle-bg); color: var(--primary); }
.wb-nav-item.is-on {
  background: var(--subtle-bg-2);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.wb-nav-ico { font-size: 14px; width: 18px; text-align: center; flex: 0 0 18px; }
.wb-nav-t { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-nav-n {
  flex: 0 0 auto; min-width: 18px; text-align: center;
  font-size: 11px; font-weight: 500; line-height: 17px;
  padding: 0 5px; border-radius: 9px;
  background: var(--neutral-bg); color: var(--neutral-text);
  border: 1px solid var(--neutral-border);
}
.wb-nav-item.is-on .wb-nav-n {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}

.wb-side-foot {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.wb-side-link {
  display: block; padding: 7px 9px; border-radius: 8px;
  font-size: 12.5px; color: var(--muted); text-decoration: none;
}
.wb-side-link:hover { background: var(--subtle-bg); color: var(--primary); }

/* ---------- 右侧内容 ---------- */
.wb-main { min-width: 0; }

/* 每个功能模块独立成块，样式和普通 panel 一致，额外加了锚点偏移 */
.wb-mod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  scroll-margin-top: 84px;          /* 锚点跳转时别被顶部固定栏盖住 */
}
.wb-mod > h2:first-child,
.wb-mod > .mdx-listhead:first-child { margin-top: 0; }
.wb-mod > h2 {
  font-size: 15.5px; margin: 0 0 6px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}

/* 模块内的二级分区（比如「我的附件」里的上传区 / 已上传列表） */
.wb-sub { margin-top: 16px; }
.wb-sub > h3 {
  margin: 0 0 8px; font-size: 13px; font-weight: 600;
  color: var(--muted); letter-spacing: .01em;
}

/* 搜索条放在内容区最上面，不占模块编号 */
.wb-main .search-panel { margin-bottom: 16px; }

/* ---------- 日记卡片的时间戳 ---------- */
.note-meta {
  font-size: 11px; color: var(--dim);
  margin: 0 0 6px; padding-left: 2px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 窄屏：侧边栏变成横向标签条 ---------- */
@media (max-width: 940px) {
  body.wb-wide .wrap { max-width: 100%; }
  .wb-layout { grid-template-columns: 1fr; gap: 12px; }
  .wb-side {
    position: static;
    padding: 8px;
    overflow-x: auto;
  }
  .wb-side-h { display: none; }
  .wb-nav { flex-direction: row; gap: 6px; }
  .wb-nav-item {
    flex: 0 0 auto;
    border-left: 0; border-bottom: 3px solid transparent;
    padding: 7px 11px;
  }
  .wb-nav-item.is-on { border-left-color: transparent; border-bottom-color: var(--primary); }
  .wb-side-foot { flex-direction: row; border-top: 0; padding-top: 0; margin-top: 6px; }
  .wb-mod { scroll-margin-top: 12px; }
}


/* ==================== 通用上传进度条（.up-*）====================
   static/upload_progress.js 配套样式。所有上传表单共用同一套，
   保证"每个地方的上传进度条长得一样、行为一样"。 */
.up-prog { margin-top: 10px; max-width: 460px; }
.up-track {
  height: 8px; border-radius: 4px; overflow: hidden;
  background: var(--line);
}
.up-track > i {
  display: block; height: 100%; width: 0;
  background: var(--primary);
  transition: width .15s linear;
}
.up-text {
  margin: 6px 0 0; font-size: 12px; line-height: 1.5;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}


/* ==================== 重点方案（.kp-*）==================== */

.kp-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* ---- 左：文件夹 ---- */
.kp-side { position: sticky; top: 74px; padding: 14px 12px; }
.kp-side-title {
  margin: 0 0 10px; font-size: 13.5px; font-weight: 600;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}

.kp-newform { display: flex; gap: 6px; margin-bottom: 10px; }
.kp-newform input {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; padding: 5px 8px;
}
.kp-newform button { flex: 0 0 auto; }

.kp-folders { display: flex; flex-direction: column; gap: 2px; }
.kp-folder {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 7px;
  font-size: 13px; color: var(--text); text-decoration: none;
  border-left: 3px solid transparent;
}
.kp-folder:hover { background: var(--subtle-bg); color: var(--primary); }
.kp-folder.is-on {
  background: var(--subtle-bg-2);
  border-left-color: var(--primary);
  color: var(--primary); font-weight: 600;
}
.kp-folder-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-folder-n {
  flex: 0 0 auto; min-width: 18px; text-align: center;
  font-size: 11px; line-height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--neutral-bg); color: var(--neutral-text);
  border: 1px solid var(--neutral-border);
}
.kp-folder.is-on .kp-folder-n {
  background: var(--primary); color: var(--on-primary); border-color: var(--primary);
}

/* ---- 右：资料区 ---- */
.kp-main { padding: 18px 20px; }
.kp-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.kp-head h2 { margin: 0; font-size: 16px; }
.kp-head-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.kp-rename { display: flex; gap: 6px; margin-bottom: 10px; }
/* ⚠️ 必须单独写这条：.kp-rename 用了 display:flex，会盖掉 hidden 属性的默认
   display:none —— 不写的话改名输入框一进页面就杵在那儿。 */
.kp-rename[hidden] { display: none; }
.kp-rename input { flex: 1 1 220px; }

.kp-table { margin-top: 14px; }
.kp-v {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border);
}
.kp-v.is-old {
  background: var(--neutral-bg); color: var(--neutral-text);
  border-color: var(--neutral-border); font-weight: 500;
}
.kp-vtag {
  display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 400;
  padding: 0 6px; border-radius: 999px;
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line);
}

.kp-hist-row > td { padding: 0 0 6px; border-bottom: 1px dashed var(--line); }
.kp-hist-row summary {
  cursor: pointer; font-size: 11.5px; color: var(--muted); padding: 4px 0;
}
.kp-hist-row summary:hover { color: var(--primary); }
.kp-hist { width: 100%; margin-top: 4px; }
.kp-hist td { padding: 5px 8px; font-size: 12px; border-bottom: 1px dashed var(--line); }
.kp-hist tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
  .kp-layout { grid-template-columns: 1fr; }
  .kp-side { position: static; }
}


/* ---- 重点方案：面包屑 + 子文件夹（多层嵌套） ---- */
.kp-crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.kp-crumb a { color: var(--muted); text-decoration: none; }
.kp-crumb a:hover { color: var(--primary); }
.kp-crumb a.is-cur { color: var(--text); font-weight: 600; }
.kp-crumb-sep { color: var(--dim); }

.kp-subfolders {
  margin: 12px 0 4px; padding: 10px 12px;
  background: var(--subtle-bg); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kp-sub-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.kp-sub-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.kp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
}
.kp-chip:hover { border-color: var(--primary); color: var(--primary); }
.kp-chip-ico { font-size: 12px; }
.kp-chip-n {
  min-width: 16px; text-align: center; font-size: 10.5px; line-height: 15px;
  padding: 0 4px; border-radius: 8px;
  background: var(--neutral-bg); color: var(--neutral-text);
  border: 1px solid var(--neutral-border);
}


/* ==================== 绘图人员画像：左右分栏（.dp-*）====================
   左室分、右宏站，两套台账格式不同，上传和结果都分开摆，互不干扰。 */
.dp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dp-col { padding: 16px 18px; min-width: 0; }
.dp-col > h2 { margin: 0 0 8px; font-size: 15px; }
.dp-sub {
  margin: 16px 0 6px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
/* 两栏里各有一张表：文件名过长要省略，否则会把操作列挤出去 */
.dp-table .kp-file { max-width: 200px; }
.dp-table .kp-file > span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dp-table { table-layout: fixed; }

/* 操作列：全局 .ops 是 white-space:nowrap（其他表格靠它不换行），
   但这里 4 个按钮（查看/报告/转置表/删除）约 200px 宽，而列只有 150px，
   不换行就会画出单元格、被面板边缘切断（"删除"只剩半个）。
   所以这里覆盖成可换行：宽屏一行放下，窄屏自动折行，永不出界。 */
.dp-table .ops {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.dp-table .ops .mini { padding-left: 5px; padding-right: 5px; }
.dp-table .ops form.inline { margin-right: 0; }

@media (max-width: 1100px) {
  .dp-split { grid-template-columns: 1fr; }
}


/* ==================== 成员配置：勾选即保存的状态位 ====================
   「保存」按钮去掉后，用户需要一个"到底存上没"的反馈。
   三态：保存中（灰）/ 已保存（绿）/ 失败（红）。 */
.perm-state {
  display: inline-block;
  font-size: 11.5px; line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
}
.perm-state.is-ok { color: var(--ok-text); }
.perm-state.is-err { color: var(--danger-text); white-space: normal; }


/* ==================== 富文本编辑器（.rt-*）====================
   只有一块内容区，没有分栏和预览。
   正文排版直接复用 .md-body（阅读页同一套），保证"编辑时看到的 = 发布后看到的"。 */
.rt { display: flex; flex-direction: column; gap: 10px; }

/* ---- 工具栏 ---- */
.rt-tools {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  padding: 7px 9px;
  background: var(--subtle-bg);
  border: 1px solid var(--line); border-radius: var(--radius);

  /* 吸顶：长文往下滚时工具条一直贴在视野里。
     top 让开顶部导航栏（.topbar 是 sticky、高 56px），否则会被它盖住；
     z-index 比导航低（导航是 10），滚到顶上时不会压住导航。
     ★ 必须是实底（--subtle-bg 是不透明的），否则下面的正文会透上来。 */
  position: sticky;
  top: 56px;
  z-index: 9;
  box-shadow: var(--shadow);
}
.rt-group { display: flex; gap: 1px; align-items: center; }
.rt-sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; flex: 0 0 auto; }

.rt-select {
  font-size: 12px; padding: 4px 6px; line-height: 1.4;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); cursor: pointer;
  max-width: 118px;
}
.rt-select:focus { outline: none; border-color: var(--primary); }

.rt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 4px;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: 13px; line-height: 1;
}
.rt-btn:hover { background: var(--surface); border-color: var(--line); }
.rt-btn.is-on {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary);
}
.rt-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* 无序列表那几个实心圆点 */
.rt-btn svg circle { fill: currentColor; stroke: none; }

/* 颜色按钮：上方 A、下方一条当前色 */
.rt-color-btn { flex-direction: column; gap: 1px; padding: 2px 4px; }
.rt-color-btn .rt-a { font-weight: 700; font-size: 12.5px; line-height: 1; }
.rt-swatch { display: block; width: 15px; height: 3px; border-radius: 2px; background: var(--danger); }

/* ---- 唯一的内容区：像一张纸 ---- */
.rt-editor {
  min-height: 480px; padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  outline: none; overflow-wrap: break-word; cursor: text;
}
.rt-editor:focus { border-color: var(--primary); }
.rt-editor img { max-width: 100%; height: auto; border-radius: 6px; }

/* 代码块：阅读页是横向滚动，编辑时要自动换行 —— 一行代码横向拖着写太难受。
   其余样式（底色、圆角、等宽字体）直接复用 .md-body pre.md-code。 */
.rt-editor pre.md-code code { white-space: pre-wrap; word-break: break-word; }
.rt-editor pre.md-code { min-height: 1.9em; }
/* 空代码块也得能点进去，否则插进去是个点不中的空格子 */
.rt-editor pre.md-code code:empty::after { content: "\200b"; }
.rt-editor:empty::before,
.rt-editor[data-empty="1"]::before {
  content: attr(data-placeholder);
  color: var(--dim);
  pointer-events: none;
}

@media (max-width: 640px) {
  .rt-editor { padding: 14px 14px; min-height: 360px; }
  .rt-select { max-width: 96px; }

  /* 窄屏如果让工具栏换行，吸顶后会占掉小半屏。
     改成单行横向滚动：高度固定，功能一个不少。 */
  .rt-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .rt-tools::-webkit-scrollbar { height: 4px; }
  .rt-tools::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
  .rt-group, .rt-select { flex: 0 0 auto; }   /* 别被压扁 */
}


/* ==================== 个人空间全局搜索（.ws-*）====================
   五个模块一起搜，先给汇总（找到多少、在哪几个模块），再分块列结果。 */

/* ---- 汇总条 ---- */
.ws-sum h2 { margin: 0 0 10px; font-size: 15px; }
.ws-sum h2 b { color: var(--primary); font-weight: 700; }

.ws-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.ws-chip:hover { border-color: var(--primary); color: var(--primary); }
.ws-chip b {
  min-width: 18px; text-align: center; font-size: 11px; line-height: 16px;
  padding: 0 5px; border-radius: 9px;
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line);
}

/* ---- 每个模块一块 ---- */
.ws-block h2 {
  margin: 0 0 10px; font-size: 14.5px;
  display: flex; align-items: center; gap: 8px;
}
.ws-count {
  font-size: 11.5px; font-weight: 400; color: var(--muted);
  padding: 1px 7px; border-radius: 9px;
  background: var(--subtle-bg); border: 1px solid var(--line);
}

.ws-list { list-style: none; margin: 0; padding: 0; }
.ws-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ws-list li:last-child { border-bottom: 0; }
.ws-list li.is-done .ws-title { color: var(--muted); text-decoration: line-through; }

.ws-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ws-title { font-weight: 600; font-size: 13.5px; }
.ws-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ws-snip { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.ws-snip-main { display: block; margin-top: 0; font-size: 13px; color: var(--text); }
.ws-go {
  display: inline-block; margin-top: 4px;
  font-size: 12px; color: var(--primary); text-decoration: none;
}
.ws-go:hover { text-decoration: underline; }

/* 关键词高亮：和附件那块保持同一种观感 */
.ws-list mark {
  background: var(--warn-bg); color: var(--warn-text);
  padding: 0 2px; border-radius: 3px;
}


/* ==================== 校验反馈（成员端）====================
   通过 / 未通过都要一眼看到：失败原因不能只靠一次性 flash，
   刷新一次就没了，用户会反复踩同一个坑。 */
.ck-banner {
  margin: 4px 0 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px; line-height: 1.7;
}
.ck-banner strong { display: block; margin-bottom: 2px; }
.ck-banner span { color: var(--muted); font-size: 12.5px; }

.ck-banner.is-ok {
  border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok-text);
}
.ck-banner.is-ok span { color: var(--ok-text); }

.ck-banner.is-bad {
  border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text);
}
.ck-banner.is-bad span { color: var(--danger-text); }

.ck-issues { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.ck-issues li { margin: 3px 0; line-height: 1.65; }

.ck-tag {
  display: inline-block; margin-right: 4px; padding: 0 6px;
  font-size: 11px; border-radius: 4px;
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line);
}
.ck-tag.ck-cell { font-family: Consolas, Menlo, monospace; }

.ck-ok { color: var(--ok-text); font-weight: 600; }
.ck-bad { color: var(--danger-text); font-weight: 600; }
.ck-why { margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.history tr.is-passed td { background: var(--ok-bg); }


/* 汇总规则说明框 */
.rule-box {
  margin-top: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--subtle-bg); font-size: 12.5px; line-height: 1.75;
}
.rule-box strong { display: block; margin-bottom: 4px; }
.rule-box ul { margin: 0; padding-left: 18px; }
.rule-box li { margin: 2px 0; color: var(--muted); }
.rule-box b { color: var(--text); }


/* 卡片标题行：左边标题、右边操作（日志页的「导出 Excel」） */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
