:root {
  --blue: #2b6cf0;
  --blue-dark: #1c50c0;
  --blue-soft: #e9f0ff;
  --blue-line: #c8dbff;
  --orange: #ff8a1f;
  --text: #1f2329;
  --text-2: #545a63;
  --muted: #8a8f99;
  --border: #e6e8eb;
  --border-2: #eef0f3;
  --bg: #f4f5f7;
  --white: #fff;
  --green: #16a34a;
  --red: #e5484d;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(20, 30, 60, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: none; }

.btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-2);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--blue-line); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger:hover { border-color: #f4c7c7; color: var(--red); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef3ff 0%, #f7f9fc 45%, #f2f5f9 100%);
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 38px 36px 30px;
  box-shadow: 0 12px 40px rgba(30, 50, 100, .1);
  border: 1px solid #edf0f5;
}
.login-card h1 { font-size: 21px; margin: 0 0 6px; font-weight: 600; }
.login-card p.sub { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.field input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd;
}
.field input:focus { border-color: var(--blue); background: #fff; }
.login-card .btn.primary { width: 100%; height: 42px; justify-content: center; font-size: 15px; margin-top: 6px; border-radius: 8px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 4px; }

/* ---------- 骨架 ---------- */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 26px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { font-weight: 600; font-size: 16px; letter-spacing: .5px; }
.brand span { color: var(--blue); }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 6px 12px; border-radius: 6px; color: var(--text-2); font-size: 14px;
}
.topnav a.on { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.topnav a:hover { color: var(--blue); }
.spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
  padding: 5px 10px; border-radius: 20px; cursor: pointer;
}
.user-chip:hover { background: var(--bg); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.menu-pop {
  position: absolute; right: 16px; top: 52px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 160px; z-index: 50;
}
.menu-pop a {
  display: block; padding: 8px 12px; border-radius: 6px; color: var(--text-2); font-size: 13px;
}
.menu-pop a:hover { background: var(--bg); color: var(--text); }

.view { padding: 22px 26px 60px; max-width: 1320px; margin: 0 auto; }

/* ---------- 云盘 ---------- */
.disk-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.disk-title { font-size: 17px; font-weight: 600; }
.disk-title em { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }
.disk-tools {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-top: 1px solid var(--border-2);
}
.disk-tools .q { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-input {
  height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px 0 30px;
  width: 210px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8f99' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 9px center no-repeat;
}
.search-input:focus { border-color: var(--blue); }
.crumb { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.crumb a { color: var(--text-2); }
.crumb a:hover { color: var(--blue); }
.crumb .sep { margin: 0 6px; color: #c8ccd4; }

table.file-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
table.file-table th {
  text-align: left; font-weight: 400; font-size: 12.5px; color: var(--muted);
  background: #fafbfc; padding: 11px 14px; border-bottom: 1px solid var(--border-2);
}
table.file-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; color: var(--text-2); }
table.file-table tr:last-child td { border-bottom: none; }
table.file-table tr:hover td { background: #fafcff; }
table.file-table tr.sel td { background: var(--blue-soft); }
.name-cell { display: flex; align-items: center; gap: 9px; color: var(--text); cursor: pointer; }
.name-cell:hover .nm { color: var(--blue); }
.ico { width: 20px; height: 20px; flex: none; }
.nm { font-weight: 400; }
.nm .badge { font-size: 11px; color: var(--blue); background: var(--blue-soft); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.tag-mini { display: inline-block; font-size: 11px; color: #7a8190; border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; margin-left: 6px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 通用弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(15, 22, 40, .35); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.dialog {
  background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(15, 25, 50, .18);
  width: 420px; max-width: 92vw; overflow: hidden;
}
.dialog header { padding: 16px 20px; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--border-2); }
.dialog .body { padding: 18px 20px; }
.dialog .foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.dialog input[type=text], .dialog input[type=password], .dialog select, .dialog textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-top: 6px;
}
.dialog label { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 12px; }

.toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 13px;
  z-index: 300; box-shadow: var(--shadow);
}
.toast.err { background: #b91c1c; }

/* ---------- 编辑器 ---------- */
.editor { display: flex; flex-direction: column; height: 100vh; background: #f0f1f4; }
.ed-head {
  height: 52px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 16px; flex: none;
}
.ed-head .title-input {
  border: 1px solid transparent; border-radius: 6px; padding: 5px 10px; font-size: 15px;
  font-weight: 500; width: 300px; background: transparent;
}
.ed-head .title-input:hover { border-color: var(--border); }
.ed-head .title-input:focus { border-color: var(--blue); background: #fff; }
.pub-id {
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px;
  background: var(--bg); padding: 4px 10px; border-radius: 20px;
}
.pub-id b { color: var(--text); font-weight: 500; letter-spacing: .5px; font-family: ui-monospace, Menlo, monospace; }
.ed-body { flex: 1; display: flex; min-height: 0; }

.ed-left {
  width: 168px; flex: none; background: #fff; border-right: 1px solid var(--border);
  overflow-y: auto; padding: 14px 12px;
}
.ed-left h4 { font-size: 12px; color: var(--muted); font-weight: 400; margin: 0 0 10px 4px; }
.outline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.outline a {
  height: 28px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-2); border: 1px solid var(--border-2);
}
.outline a:hover { border-color: var(--blue-line); color: var(--blue); }

.ed-center { flex: 1; overflow-y: auto; padding: 22px 0 60px; }
.paper {
  width: 780px; margin: 0 auto; background: #fff; min-height: 1000px;
  box-shadow: 0 2px 12px rgba(20, 30, 60, .06); border-radius: 3px; padding: 52px 62px 70px;
}
.paper h1 { font-size: 20px; text-align: center; margin: 0 0 6px; }
.paper .paper-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.paper .sec-title { font-size: 14px; font-weight: 600; margin: 22px 0 12px; }
.q-block { padding: 14px 0 10px; border-bottom: 1px dashed #eef0f3; position: relative; }
.q-block:hover { background: #fcfdff; }
.q-block .q-stem { font-size: 14.5px; line-height: 1.95; }
.q-block .q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin-top: 6px; font-size: 14px; }
.q-block .q-opts .opt { color: #2c3138; }
.q-block .q-tools { margin-top: 8px; display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; }
.q-block .q-tools .ops { margin-left: auto; display: flex; gap: 12px; }
.q-block .q-tools a { color: var(--blue); font-size: 12.5px; }
.q-del { position: absolute; right: -1px; top: 8px; color: #c3c8d1; font-size: 16px; cursor: pointer; opacity: 0; }
.q-block:hover .q-del { opacity: 1; }
.paper .empty-hint { text-align: center; color: var(--muted); padding: 120px 0; font-size: 13.5px; line-height: 2; }

/* 双栏预览：只分正文，抬头保持通栏；选项在窄栏里一律单列，跟 Word 一致 */
.paper-body.two-col { column-count: 2; column-gap: 30px; column-rule: 1px dashed #e8ebf0; }
.paper-body.two-col .blk-q,
.paper-body.two-col .q-block { break-inside: avoid-column; }
.paper-body.two-col .blk-heading { break-after: avoid-column; }
.paper-body.two-col .blk-heading.lv1 .h-line { margin-top: 10px; }
.paper-body.two-col .blk-q .q-opts,
.paper-body.two-col .q-block .q-opts { display: block; }
.paper-body.two-col .blk-q .q-opts .q-opt,
.paper-body.two-col .q-block .q-opts .opt { padding-left: 1em; }
.paper-body.two-col .blk-q .q-stem img { max-width: 76%; margin: 4px auto; }

.ed-right {
  width: 452px; flex: none; background: #fff; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.rt-tabs { display: flex; align-items: center; gap: 18px; padding: 0 16px; height: 46px; border-bottom: 1px solid var(--border-2); flex: none; }
.rt-tabs button {
  border: 0; background: none; padding: 12px 2px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent;
}
.rt-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.rt-close { margin-left: auto; color: var(--muted); cursor: pointer; font-size: 16px; }
.rt-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
.rt-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* 筛选 */
.filter-wrap { display: flex; flex: 1; min-height: 0; }
.side-tab {
  width: 40px; flex: none; background: var(--blue); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 12.5px; letter-spacing: 3px;
  writing-mode: vertical-rl; padding: 12px 0; border-radius: 0;
}
.filters { flex: 1; overflow-y: auto; padding: 12px 14px; }
.f-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start; }
.f-label { width: 40px; flex: none; color: var(--muted); font-size: 12.5px; padding-top: 4px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.chip {
  border: 0; background: none; padding: 3px 6px; border-radius: 4px; font-size: 12.5px; color: var(--text-2);
}
.chip:hover { color: var(--blue); background: var(--blue-soft); }
.chip.on { color: var(--blue); background: var(--blue-soft); font-weight: 500; }
.f-more { color: var(--blue); font-size: 12px; cursor: pointer; }
.kw-box { padding: 0 14px 10px; display: flex; gap: 8px; }
.kw-box input { flex: 1; height: 30px; border: 1px solid var(--border); border-radius: 16px; padding: 0 12px; font-size: 13px; }

.q-list { flex: 1; overflow-y: auto; padding: 0 14px 12px; }
.q-card { border: 1px solid var(--border-2); border-radius: 8px; padding: 12px; margin-bottom: 10px; transition: border-color .15s; }
.q-card:hover { border-color: var(--blue-line); }
.q-card .meta-top { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.q-card .stem { font-size: 13px; line-height: 1.8; color: var(--text); max-height: 96px; overflow: hidden; }
.q-card .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-top: 5px; font-size: 12.5px; color: var(--text-2); }
.q-card .foot { margin-top: 8px; display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.q-card .foot .acts { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.q-card .foot a { color: var(--blue); font-size: 12px; }
.sel-btn {
  border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 5px;
  height: 24px; padding: 0 9px; font-size: 12px;
}
.sel-btn.on { background: var(--blue); color: #fff; }
.add-bar {
  flex: none; padding: 10px 14px; border-top: 1px solid var(--border-2); display: flex;
  align-items: center; gap: 10px; background: #fff;
}
.add-bar .cnt { font-size: 12.5px; color: var(--muted); }
.add-bar .cnt b { color: var(--blue); }
.add-bar .btn.primary { margin-left: auto; }

/* 知识树 */
.kt { overflow-y: auto; padding: 10px 12px; flex: 1; }
.kt-node { font-size: 13px; color: var(--text-2); padding: 7px 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.kt-node:hover { background: var(--bg); }
.kt-node.on { background: var(--blue-soft); color: var(--blue); }
.kt-node .plus { width: 14px; color: var(--muted); font-size: 12px; flex: none; }
.kt-node .cnt { margin-left: auto; font-size: 11px; color: #b3b8c2; }
.kt-children { margin-left: 14px; border-left: 1px dashed var(--border); padding-left: 4px; }
.kt-search { padding: 10px 12px 0; }
.kt-search input { width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 16px; padding: 0 12px; font-size: 13px; }
.kt-book { margin: 8px 12px 0; background: var(--blue-soft); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; color: var(--blue); display: flex; justify-content: space-between; }

/* 导入文档 */
.imp { padding: 16px; }
.imp-steps { display: flex; gap: 8px; margin-bottom: 20px; font-size: 12.5px; color: var(--muted); align-items: center; }
.imp-steps span.d { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; margin-right: 5px; }
.imp-steps .on { color: var(--blue); }
.imp-steps .on span.d { background: var(--blue); color: #fff; }
.imp-steps .arrow { color: #d5d9e0; }
.imp input[type=text] {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 6px; padding: 0 12px;
  font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px;
}
.imp .hint { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 12px; }
.imp .btn.primary { width: 100%; justify-content: center; margin-top: 14px; height: 36px; }
.imp-list { margin-top: 14px; max-height: 300px; overflow-y: auto; }
.imp-item { display: flex; gap: 9px; padding: 9px 4px; border-bottom: 1px solid var(--border-2); font-size: 12.5px; cursor: pointer; }
.imp-item .tx { line-height: 1.7; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.imp-item input { margin-top: 2px; }
.imp-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 12px 0 8px; overflow: hidden; }
.imp-head b { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-head a { flex: none; }

/* AI 改编 */
.ai-mask { position: fixed; inset: 0; background: rgba(15, 22, 40, .3); z-index: 120; display: flex; justify-content: flex-end; }
.ai-panel {
  width: 560px; max-width: 96vw; background: #fff; height: 100%; display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(15, 25, 50, .14);
}
.ai-head { height: 52px; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--border-2); gap: 8px; }
.ai-head .t { font-size: 15px; font-weight: 500; }
.ai-head .x { margin-left: auto; color: var(--muted); cursor: pointer; font-size: 17px; }
.ai-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff 0%, #fff 55%, #eff5ff 100%); }
.origin-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.origin-card h5 { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.origin-card .stem { font-size: 13.5px; line-height: 1.9; }
.origin-card .opts { margin-top: 8px; font-size: 13px; line-height: 1.9; }
.ai-msg { margin-top: 16px; border-radius: 10px; padding: 14px; font-size: 13.5px; line-height: 1.9; }
.ai-msg.bot { background: #fff; border: 1px solid var(--border); }
.ai-msg.user { margin-left: auto; max-width: 86%; background: #eaf3ed; color: #2f4e3e; border: 1px solid #d5e5db; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-edit-label { display: block; margin-top: 10px; color: var(--text-2); font-size: 12px; }
.ai-edit-label textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; resize: vertical; }
.ai-option-row { display: flex; align-items: end; gap: 8px; }
.ai-option-row .ai-edit-label { flex: 1; min-width: 0; }
.ai-retry-label { background: #f4f5f7 !important; color: var(--text-2) !important; border-color: var(--border) !important; }
.ai-pending { color: var(--muted); }
.ai-input .send:disabled { opacity: .55; cursor: wait; }
.ai-msg .note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); }
.ai-modes { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-top: auto; padding-top: 18px; }
.ai-mode {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px;
  font-size: 13px; color: var(--text-2); box-shadow: 0 1px 4px rgba(20,30,60,.04);
}
.ai-mode:hover, .ai-mode.on { border-color: var(--blue); color: var(--blue); }
.ai-foot { flex: none; padding: 12px 16px; border-top: 1px solid var(--border-2); background: #fff; }
.ai-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ai-input input { flex: 1; border: 0; font-size: 13px; }
.ai-input .send { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 14px; }
.ai-target { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ai-target b { color: var(--blue); font-weight: 500; }

/* 题库页 */
.panel { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 14px; font-weight: 500; margin: 0 0 14px; }
.bank-table td .stem-cell { max-width: 520px; line-height: 1.7; color: var(--text); }
.bank-table tr.family-start td { border-top: 2px solid var(--line, #e8e4d9); }
.bank-table .family-mark { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 999px; color: #315443; background: #edf4ef; font-size: 12px; white-space: nowrap; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.kpi { display: flex; gap: 26px; }
.kpi div { font-size: 12.5px; color: var(--muted); }
.kpi b { display: block; font-size: 20px; color: var(--text); font-weight: 600; margin-bottom: 2px; }

body.editing { overflow: hidden; }
body.editing #shell { height: 100vh; }
#shell { min-height: 100vh; }

body.editing .topbar { display: none; }

/* ───────────── 试卷录入 / 校对台 ───────────── */
.page-wrap { max-width: 1000px; margin: 0 auto; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 13px; }

.dropzone {
  border: 1.5px dashed var(--blue-line); border-radius: 12px; background: #fbfcff;
  padding: 34px 20px; text-align: center; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.on { border-color: var(--blue); background: var(--blue-soft); }
.dz-ico { font-size: 26px; color: var(--blue); line-height: 1; }
.dz-t { font-size: 15px; font-weight: 500; margin: 10px 0 6px; }
.dz-s { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

/* 三种录入通道的适用场景 */
.chan-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.chan { background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; }
.chan b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.chan span { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) { .chan-row { grid-template-columns: 1fr; } }

/* 上传被拦下时的指引卡 */
.gate { display: flex; gap: 14px; background: #fff8ef; border: 1px solid #fbd6ad;
  border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.gate-ico { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--orange);
  color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center;
  justify-content: center; }
.gate-body { flex: 1; min-width: 0; }
.gate-body b { display: block; font-size: 14px; margin-bottom: 7px; }
.gate-body p { margin: 0 0 9px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.gate-body ol { margin: 0 0 11px; padding-left: 20px; font-size: 13px;
  color: var(--text-2); line-height: 1.9; }
.gate-act { display: flex; gap: 8px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tr:hover td { background: #fafbfd; }
.row-act a { margin-right: 12px; font-size: 12.5px; }
.row-act .danger { color: var(--red); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 4px; line-height: 18px; }
.tag.green { color: #147a3d; background: #e7f7ee; }
.tag.orange { color: #a35b00; background: #fff3e2; }
.tag.red { color: #b3261e; background: #fdecea; }

/* 校对台整屏 */
.imp-page { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.imp-top {
  display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 16px;
  background: #fff; border-bottom: 1px solid var(--border); flex: none;
}
.imp-title { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.imp-title b { font-size: 14px; font-weight: 600; max-width: 420px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.imp-title span { font-size: 11.5px; }
.imp-stat { font-size: 12.5px; color: var(--text-2); }
.imp-stat b { color: var(--text); font-weight: 600; }

.imp-cols { flex: 1; display: flex; min-height: 0; }
.imp-nav { width: 236px; flex: none; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; }
.imp-nav-head { display: flex; justify-content: space-between; padding: 12px 14px 8px;
  font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border-2); }
.imp-nav-body { flex: 1; overflow-y: auto; padding: 6px 8px 20px; }
.imp-li { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px;
  cursor: pointer; margin-bottom: 2px; }
.imp-li:hover { background: #f6f8fb; }
.imp-li.on { background: var(--blue-soft); }
.imp-li.done .imp-no { color: var(--green); border-color: #b7e4c9; }
.imp-no { width: 26px; height: 26px; flex: none; border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-2);
  background: #fff; }
.imp-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imp-li-main b { font-size: 12.5px; font-weight: 500; }
.imp-li-main em { font-style: normal; font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #c9cfd8; }
.imp-dot.ok { background: #24a148; }
.imp-dot.mid { background: #f0a020; }
.imp-dot.low { background: #e5484d; }
.imp-warn { width: 15px; height: 15px; flex: none; border-radius: 50%; background: #fff3e2;
  color: #b26a00; font-size: 10.5px; font-style: normal; display: flex;
  align-items: center; justify-content: center; }

.imp-edit { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0;
  background: #fff; margin: 12px; border-radius: 10px; border: 1px solid var(--border); }
.imp-edit-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-2); font-size: 13px; flex: none; }
.imp-edit-head .muted { font-size: 12px; }
.chk { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.imp-warns { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.imp-warns span { font-size: 11.5px; color: #a35b00; background: #fff5e6; border: 1px solid #ffe2b8;
  border-radius: 4px; padding: 2px 7px; }
.imp-body { flex: 1; overflow-y: auto; padding: 14px 16px 8px; }
.imp-field { margin-bottom: 14px; }
.imp-field > label { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--muted); margin-bottom: 6px; }
.imp-field > label a { font-size: 12px; }
.imp-field textarea, .imp-field input[type=text], .imp-field > input {
  width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px;
  font-size: 13.5px; line-height: 1.75; resize: vertical; background: #fcfcfd; }
.imp-field textarea:focus, .imp-field input:focus { background: #fff; border-color: var(--blue-line); }
.imp-prev { margin-top: 8px; padding: 10px 12px; background: #fafbfd; border: 1px dashed var(--border);
  border-radius: 7px; font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.imp-prev:empty { display: none; }
.imp-prev .q-img { max-width: 100%; display: block; margin: 6px 0; }
.imp-opts { display: flex; flex-direction: column; gap: 6px; }
.imp-opt { display: flex; gap: 7px; align-items: flex-start; flex-wrap: wrap; }
.opt-key { width: 34px !important; text-align: center; padding: 9px 0 !important; }
.opt-text { flex: 1; min-width: 0; }
.opt-prev { flex-basis: calc(100% - 41px); margin: 0 35px 4px 41px; }
.opt-prev .q-img { max-height: 180px; object-fit: contain; object-position: left center; }
.imp-x { width: 28px; height: 34px; border: none; background: transparent; color: #c3c8d1;
  font-size: 16px; border-radius: 6px; }
.imp-x:hover { background: #fdecea; color: var(--red); }
.imp-crop { padding: 0 16px 12px; }
.imp-crop img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; }
.imp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-top: 1px solid var(--border-2); flex: none; }

.imp-tags { width: 274px; flex: none; background: #fff; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; }
.imp-tag-head { display: flex; align-items: baseline; gap: 8px; padding: 13px 15px 9px;
  border-bottom: 1px solid var(--border-2); font-size: 13px; }
.imp-tag-head span { font-size: 11.5px; }
.imp-tag-body { flex: 1; overflow-y: auto; padding: 12px 15px; }
.imp-tag { margin-bottom: 13px; }
.imp-tag-h { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  margin-bottom: 5px; }
.imp-tag select { width: 100%; height: 31px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 8px; font-size: 13px; background: #fcfcfd; }
.imp-tag-val { font-size: 12.5px; color: var(--text); line-height: 1.6; }
.imp-tag-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.imp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.imp-chips .chip { font-size: 11.5px; padding: 2px 8px; }
.imp-tag-foot { padding: 10px 15px; border-top: 1px solid var(--border-2); }
.imp-tag-foot .btn { width: 100%; }

/* 分节标题过长时截断，避免顶到右侧控件 */
.imp-edit-head > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.imp-edit-head > div:first-child .muted { max-width: 46vw; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* ==================== 文档编辑器（块模型） ==================== */

.ez { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.ez-top {
  height: 52px; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; background: #fff; border-bottom: 1px solid var(--border); position: relative; z-index: 30;
}
.ez-back {
  width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  color: var(--text-2); font-size: 15px; cursor: pointer; line-height: 1;
}
.ez-back:hover { border-color: var(--blue); color: var(--blue); }
.ez-title {
  border: 1px solid transparent; background: transparent; font-size: 14.5px; font-weight: 600;
  color: var(--text); padding: 5px 8px; border-radius: 6px; width: 260px; font-family: inherit;
}
.ez-title:hover { background: #f6f7f9; }
.ez-title:focus { outline: 0; background: #fff; border-color: var(--blue); }
.ez-save { font-size: 12px; color: var(--muted); }
.ez-pub { font-size: 11.5px; color: var(--muted); }
.ez-pub b { color: var(--text-2); letter-spacing: .3px; }
.ez-pub a { color: var(--blue); margin-left: 4px; }
.ez-top .spacer { flex: 1; }

.ez-drop { position: relative; }
.ez-menu {
  position: absolute; top: 34px; left: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); padding: 6px; width: 208px; z-index: 40;
}
.ez-menu-t { font-size: 11px; color: var(--muted); padding: 6px 8px 3px; }
.ez-menu button {
  display: flex; width: 100%; align-items: center; gap: 6px; border: 0; background: none;
  text-align: left; padding: 7px 8px; border-radius: 5px; font-size: 13px; color: var(--text); cursor: pointer;
  font-family: inherit;
}
.ez-menu button:hover { background: var(--blue-soft); color: var(--blue); }
.ez-menu button span { font-size: 11px; color: var(--muted); margin-left: auto; }

.ez-body { flex: 1; display: flex; min-height: 0; }

/* 左侧目录 */
.ez-left { width: 208px; flex: none; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; }
.ez-left-head {
  height: 40px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; border-bottom: 1px solid var(--border-2); font-size: 12.5px; color: var(--text-2);
}
.ez-left-head i { font-style: normal; font-size: 11px; color: var(--muted); }
.ez-toc { flex: 1; overflow-y: auto; padding: 6px; }
.toc-item {
  display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 5px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; position: relative;
}
.toc-item:hover { background: #f2f5fb; }
.toc-item .dgt { color: #ccd2dc; font-size: 11px; cursor: grab; flex: none; }
.toc-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-item .no {
  flex: none; min-width: 16px; text-align: center; font-size: 11px; color: var(--blue);
  background: var(--blue-soft); border-radius: 3px; padding: 0 3px;
}
.toc-item.h { font-weight: 600; color: var(--text); }
.toc-item.h.lv1 { margin-top: 6px; font-size: 13px; }
.toc-item.h.lv2 { padding-left: 14px; }
.toc-item.h .n { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; }
.toc-item.t { color: var(--muted); }
.toc-item.dragging { opacity: .35; }
.toc-item.over { box-shadow: inset 0 2px 0 var(--blue); }

/* 中间稿纸 */
.ez-center { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 0 90px; display: flex; align-items: flex-start; justify-content: center; }
.ez-paper-wrap { display: block; width: 100%; }
.ez .paper {
  width: 21cm; min-height: 29.7cm; margin: 0 auto; background: #fff; padding: 2.2cm 2.2cm 2.6cm;
  box-shadow: 0 2px 20px rgba(20, 30, 60, .10); border-radius: 2px;
  font-family: "Times New Roman", "SimSun", "宋体", serif; color: #14161a; position: relative;
}
.ez .paper-title {
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif; font-size: 18pt; font-weight: 700;
  text-align: center; margin: 0 0 6px; line-height: 1.35;
}
.ez .paper-sub, .ez .paper-info, .ez .paper-seal, .ez .paper-notice {
  text-align: center; font-size: 10.5pt; color: #3a3f47; line-height: 1.7;
}
.ez .paper-seal {
  color: #5b616b; border-bottom: 1px solid #b9bec7; padding-bottom: 8px; margin: 6px 0 14px;
}
.ez .paper-notice { text-align: left; color: #3a3f47; margin: 6px 0 12px; line-height: 1.8; }
.ez .paper-empty { text-align: center; color: #a4aab3; font-size: 13px; line-height: 2.1; padding: 120px 0; }

/* 文档块与悬停插入控件 */
.blk { position: relative; margin: 0 -10px; padding: 3px 10px; border-radius: 4px; }
.blk:hover, .blk:focus-within { background: #f7f9fd; box-shadow: inset 0 0 0 1px #e3ebf8; }
.blk-insert {
  position: absolute; left: -31px; top: 1px; z-index: 7; display: none;
  width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: #87909d; font: 20px/20px var(--font); cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 30, 60, .10);
}
.blk:hover .blk-insert, .blk:focus-within .blk-insert, .blk-insert:focus-visible { display: block; }
.blk-insert:hover, .blk-insert:focus-visible { border-color: var(--blue); color: var(--blue); outline: 0; }

.blk-heading .h-line { display: flex; align-items: baseline; gap: 0; flex-wrap: wrap; }
.blk-heading.lv1 .h-line { font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif; font-weight: 700; font-size: 12pt; margin: 14px 0 4px; }
.blk-heading.lv2 .h-line { font-family: "SimHei", "黑体", sans-serif; font-weight: 700; font-size: 11pt; margin: 10px 0 3px; }
.blk-heading.lv3 .h-line, .blk-heading.lv4 .h-line { font-weight: 700; font-size: 10.5pt; margin: 8px 0 2px; }
.blk-heading .h-tip { font-weight: 400; font-size: 9.5pt; color: #6b7280; margin-left: 4px; font-family: var(--font); }
.blk-heading [contenteditable] { outline: 0; min-width: 40px; border-bottom: 1px dashed transparent; }
.blk-heading [contenteditable]:focus { border-bottom-color: var(--blue-line); }

.blk-text .t-line { font-size: 10.5pt; line-height: 1.7; text-indent: 2em; outline: 0; min-height: 1.6em; }
.blk-text .t-line:focus { background: #fff; box-shadow: 0 0 0 1px #e3ebf8; border-radius: 3px; }

.blk-q .q-line { font-size: 10.5pt; line-height: 1.7; }
.blk-q .q-line.q-stem-line { display: block; margin-top: 1px; }
.blk-q .q-topline, .blk-q .q-line:not(.q-stem-line) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; }
.blk-q .q-source { display: inline-flex; align-items: baseline; gap: 3px; margin: 0 4px 0 2px; color: #6b7280; font-size: 9.5pt; }
.blk-q .q-source b { font-weight: 500; white-space: nowrap; }
.blk-q .q-source select { max-width: min(100%, 680px); padding: 0 2px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.blk-q .q-source select:hover, .blk-q .q-source select:focus { background: #f1f4f7; outline: 1px solid #d6e0ea; }
.blk-q { break-inside: avoid; page-break-inside: avoid; }
.blk-q .q-num { font-weight: 700; margin-right: 2px; }
.blk-q .q-mark { font-weight: 700; }
.blk-q .q-star { color: #f59e0b; font-size: 8pt; letter-spacing: .5px; margin: 0 3px; font-family: var(--font); }
.blk-q .q-score { color: #6b7280; font-size: 9.5pt; margin-right: 4px; }
.blk-q .q-stem img { max-width: 62%; display: block; margin: 6px auto; }
.blk-q .q-opts { margin: 2px 0 0; font-size: 10.5pt; line-height: 1.7; }
.blk-q .q-opts.cols-1 { display: block; }
.blk-q .q-opts.cols-1 .q-opt { padding-left: 1em; }
.blk-q .q-opts.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.blk-q .q-opts.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 10px; }
.blk-q .q-opts .q-opt img { max-width: 90%; }
.blk-q .q-ans {
  margin-top: 6px; padding: 6px 9px; background: #f7f8fa; border-left: 2px solid var(--blue-line);
  font-size: 9.5pt; line-height: 1.8; color: #3a3f47; border-radius: 0 4px 4px 0;
}
.blk-q .q-meta {
  margin-top: 4px; display: flex; gap: 12px; font-size: 11px; color: #a7adb7;
  font-family: var(--font); opacity: 0; transition: opacity .12s;
}
.blk-q:hover .q-meta { opacity: 1; }
.blk-q .q-meta a { color: var(--blue); }

.inline-ins {
  position: absolute; left: -34px; top: 28px; z-index: 12; display: flex; flex-direction: column;
  gap: 2px; width: 156px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 6px; box-shadow: var(--shadow); font-family: var(--font);
}
.inline-ins > b { padding: 5px 7px 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.inline-ins button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: #fff; border-radius: 5px; padding: 7px 8px; font-size: 12.5px;
  color: var(--text-2); text-align: left; cursor: pointer; font-family: inherit;
}
.inline-ins button:hover { background: var(--blue-soft); color: var(--blue); }
.inline-ins button span { color: var(--muted); font-size: 10.5px; }

/* 右侧竖栏 */
.ez-bar {
  width: 72px; flex: none; background: #fff; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 10px 0; gap: 2px; align-items: center;
}
.ez-bar-btn {
  width: 60px; border: 0; background: none; padding: 9px 2px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-2); cursor: pointer;
  border-radius: 7px; font-family: var(--font);
}
.ez-bar-btn .ic { font-size: 16px; line-height: 1; }
.ez-bar-btn:hover { background: #f4f6fa; }
.ez-bar-btn.on { background: var(--blue-soft); color: var(--blue); }

/* 抽屉 */
.ez-drawer {
  flex: none; background: #fff; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; box-shadow: -6px 0 18px rgba(20, 30, 60, .04);
}
.ez-drawer[hidden] { display: none !important; }
.ez-drawer-head {
  height: 42px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 14px; border-bottom: 1px solid var(--border-2); font-size: 13px;
}
.ez-drawer-head .x { cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
.ez-drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.ez-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 40px 16px; line-height: 1.9; }

/* 全局设置 */
.gs-tabs { display: flex; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--border-2); flex: none; }
.gs-tabs button {
  border: 0; background: none; padding: 11px 0; font-size: 13px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; font-family: inherit;
}
.gs-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.gs-body { padding: 4px 14px 20px; }
.gs-sec { border-bottom: 1px solid var(--border-2); padding: 12px 0; }
.gs-sec:last-child { border-bottom: 0; }
.gs-title { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.gs-sub { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.gs-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.gs-label { font-size: 12.5px; color: var(--text-2); width: 62px; flex: none; padding-top: 2px; }
.gs-ctrl { flex: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gs-stack { display: flex; flex-direction: column; gap: 7px; }
.gs-stack.row { flex-direction: row; align-items: center; gap: 10px; }
.gs-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.gs-check input { accent-color: var(--blue); margin: 0; }
.gs-select {
  border: 1px solid var(--border); border-radius: 5px; padding: 4px 8px; font-size: 12.5px;
  color: var(--text); background: #fff; font-family: inherit;
}
.gs-select.sm { width: 110px; }
.gs-input {
  width: 100%; border: 1px solid var(--border); border-radius: 5px; padding: 6px 9px;
  font-size: 12.5px; font-family: inherit; margin-top: 8px;
}
.gs-input.sm { width: 90px; margin-top: 0; }
.gs-input:focus, .gs-select:focus { outline: 0; border-color: var(--blue); }
.gs-note { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.gs-seg { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; width: fit-content; }
.gs-seg button {
  border: 0; background: #fff; padding: 5px 16px; font-size: 12.5px; color: var(--text-2);
  cursor: pointer; border-right: 1px solid var(--border); font-family: inherit;
}
.gs-seg button:last-child { border-right: 0; }
.gs-seg button.on { background: var(--blue); color: #fff; }
.gs-seg.wide { width: 100%; }
.gs-seg.wide button { flex: 1; padding: 6px 0; }
.gs-batch { display: flex; gap: 8px; }
.gs-batch button {
  flex: 1; border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 6px 0;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: inherit;
}
.gs-batch button:hover { border-color: var(--blue); color: var(--blue); }
.gs-mini {
  border: 1px solid var(--border); background: #fff; border-radius: 5px; padding: 3px 10px;
  font-size: 12px; color: var(--text-2); cursor: pointer;
}
.gs-soon { font-size: 11px; color: var(--muted); }
.gs-mask {
  position: fixed; inset: 0; background: rgba(20, 26, 38, .38); display: flex;
  align-items: center; justify-content: center; z-index: 200;
}
.gs-dialog { background: #fff; border-radius: 10px; width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.gs-dialog.wide { width: 460px; }
.gs-dialog-batch { width: min(920px, calc(100vw - 36px)); }
.gs-dialog-batch .gs-dialog-body { max-height: min(72vh, 760px); display: flex; flex-direction: column; gap: 12px; }
.gs-batch-scope, .gs-batch-total { color: var(--muted); font-size: 12px; }
.gs-batch-total { display: flex; align-items: center; gap: 9px; }
.gs-batch-actions { display: flex; gap: 8px; }
.gs-batch-table-wrap { overflow: auto; border: 1px solid var(--line-1); border-radius: 8px; }
.gs-batch-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.gs-batch-table th, .gs-batch-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-1); text-align: left; vertical-align: middle; }
.gs-batch-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-weight: 600; }
.gs-batch-table tr:last-child td { border-bottom: 0; }
.gs-batch-table td:first-child { width: 58px; text-align: center; }
.gs-batch-table .gs-batch-stem { min-width: 230px; max-width: 420px; color: var(--ink-2); }
.gs-batch-table .gs-input { margin: 0; }
.gs-batch-source-label { color: var(--muted); }
.gs-switch { display: inline-flex; cursor: pointer; }
.gs-switch input { position: absolute; opacity: 0; }
.gs-switch span { width: 34px; height: 19px; border-radius: 99px; background: #c6c8c9; position: relative; transition: background .15s; }
.gs-switch span::after { content: ''; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0002; transition: transform .15s; }
.gs-switch input:checked + span { background: var(--brand); }
.gs-switch input:checked + span::after { transform: translateX(15px); }
.gs-switch input:focus-visible + span { outline: 2px solid var(--brand-line); outline-offset: 2px; }
.gs-dialog-head {
  padding: 15px 18px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: space-between;
}
.gs-dialog-head .x { cursor: pointer; color: var(--muted); font-size: 17px; line-height: 1; font-weight: 400; }
.gs-dialog-body { padding: 16px 18px; }
.gs-dialog-foot {
  padding: 12px 18px; border-top: 1px solid var(--border-2); display: flex; justify-content: flex-end; gap: 8px;
}
.gs-inline { font-size: 12.5px; color: var(--text-2); }

/* 导出 */
.exp-vers { display: flex; gap: 8px; margin-bottom: 14px; }
.exp-card {
  flex: 1; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 10px;
  text-align: left; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; gap: 3px;
}
.exp-card b { font-size: 13px; color: var(--text); }
.exp-card span { font-size: 11px; color: var(--muted); line-height: 1.5; }
.exp-card.on { border-color: var(--blue); background: var(--blue-soft); }
.exp-card.on b { color: var(--blue); }
.exp-format { display: flex; align-items: center; gap: 7px; margin: 15px 0 0; color: var(--text-2); font-size: 12.5px; }
.exp-format span { margin-right: 3px; }
.exp-format button { min-width: 62px; height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text-2); font: inherit; cursor: pointer; }
.exp-format button:hover { border-color: var(--brand-line); }
.exp-format button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.exp-opts { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.exp-opts select {
  border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px; font-size: 12.5px;
  margin-left: 5px; font-family: inherit;
}
.exp-opts .chk { display: inline-flex; align-items: center; gap: 5px; }

/* 题库抽屉 */
.bank-tabs { display: flex; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--border-2); flex: none; }
.bank-tabs button {
  border: 0; background: none; padding: 10px 0; font-size: 12.5px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit;
}
.bank-tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.bank-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.bank-foot {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--border-2); font-size: 12.5px; color: var(--text-2);
}
.bank-foot b { color: var(--blue); }
.bank-foot .btn { margin-left: auto; }
.bank-foot .btn + .btn { margin-left: 0; }
.kw-box { padding: 10px 14px 6px; }
.kw-box input {
  width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 9px; font-size: 12.5px; font-family: inherit;
}
.filters { padding: 4px 14px 8px; }
.f-row { display: flex; gap: 8px; padding: 3px 0; align-items: flex-start; }
.f-label { width: 34px; flex: none; font-size: 11.5px; color: var(--muted); padding-top: 4px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.f-chips .chip {
  border: 1px solid transparent; background: #f4f6fa; border-radius: 4px; padding: 3px 8px;
  font-size: 11.5px; color: var(--text-2); cursor: pointer; font-family: inherit;
}
.f-chips .chip.on { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.f-select, .f-input {
  border: 1px solid var(--border); border-radius: 4px; height: 24px; font-size: 11.5px;
  padding: 0 5px; font-family: inherit; background: #fff; color: var(--text-2);
}
.f-input { width: 74px; }
.f-sum { font-size: 11px; color: var(--muted); padding-top: 4px; }
.q-list { flex: 1; overflow-y: auto; padding: 4px 14px 10px; }
.q-card {
  border: 1px solid var(--border-2); border-radius: 7px; padding: 9px 10px; margin-bottom: 8px; background: #fff;
}
.q-card:hover { border-color: var(--blue-line); }
.q-card-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.q-card-stem { font-size: 12.5px; line-height: 1.7; color: var(--text); max-height: 88px; overflow: hidden; }
.q-card-stem img { max-width: 100%; }
.q-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.sel-btn {
  border: 1px solid var(--blue-line); background: #fff; color: var(--blue); border-radius: 4px;
  padding: 3px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit;
}
.sel-btn.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 0 12px; font-size: 11.5px; color: var(--muted); }
.kt-book { padding: 0 14px 8px; }
.kt { flex: 1; overflow-y: auto; padding: 0 14px 10px; }
.kt-node { display: flex; gap: 6px; align-items: center; padding: 4px 4px; font-size: 12.5px; color: var(--text-2); cursor: pointer; border-radius: 4px; }
.kt-node:hover { background: #f4f6fa; }
.kt-node .plus { color: #b9c0cb; font-size: 11px; width: 12px; }
.kt-children { padding-left: 14px; }
.kt-qs { border-top: 1px solid var(--border-2); padding: 8px 14px; max-height: 42%; overflow-y: auto; }
.kt-qs-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin-bottom: 6px; }
.kt-qs-head span { font-size: 11px; color: var(--muted); }
.kt-qs-item { display: flex; gap: 7px; padding: 5px 0; font-size: 12px; color: var(--text-2); line-height: 1.6; cursor: pointer; }
.kt-qs-item span { max-height: 44px; overflow: hidden; }

/* 导入面板 */
.imp-panel { padding: 14px; }
.imp-tip { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0 0 4px; }
.imp-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin: 12px 0 6px; }
.imp-head span { font-size: 11px; color: var(--muted); }
.imp-list { max-height: 300px; overflow-y: auto; }
.imp-item { display: flex; gap: 7px; padding: 6px 0; font-size: 12px; color: var(--text-2); line-height: 1.6; cursor: pointer; border-bottom: 1px dashed var(--border-2); }
.imp-item span { max-height: 46px; overflow: hidden; }
.imp-foot { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- 审核台 ---------- */
.rv-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-2); }
.rv-tabs { display: flex; gap: 2px; background: #f4f6fa; padding: 3px; border-radius: 7px; }
.rv-tabs button { height: 26px; padding: 0 12px; border: 0; background: transparent; border-radius: 5px;
  font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.rv-tabs button:hover { color: var(--blue); }
.rv-tabs button.on { background: #fff; color: var(--blue); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 30, 60, .1); }
.rv-tabs button i { font-style: normal; font-size: 11px; color: var(--muted); }
.rv-tabs button.on i { color: var(--blue); }
.rv-batch { display: flex; align-items: center; gap: 8px; }
.rv-pick { font-size: 12px; color: var(--muted); }
.rv-tip { font-size: 11.5px; color: var(--muted); }
.btn.sm.ok { border-color: #bfe6cd; color: var(--green); }
.btn.sm.ok:hover { background: #eefaf2; border-color: var(--green); }
.btn.sm.danger { border-color: #f6d4d5; color: var(--red); }
.btn.sm.danger:hover { background: #fdf1f1; border-color: var(--red); }
.kpi div.kpi-warn b { color: var(--orange); }
.row-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.rv-tag { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; line-height: 17px; }
.rv-approved { background: #eafaf0; color: #15803d; }
.rv-pending { background: #fff4e6; color: #b45309; }
.rv-rejected { background: #fdeeee; color: #b42318; }
td.ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini { height: 22px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); }
.mini.ok { border-color: #bfe6cd; color: var(--green); }
.mini.ok:hover { background: #eefaf2; }
.mini.no { border-color: #f6d4d5; color: var(--red); }
.mini.no:hover { background: #fdf1f1; }
.rv-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rv-quick button { height: 24px; padding: 0 9px; font-size: 11.5px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2); }
.rv-quick button:hover { border-color: var(--blue-line); color: var(--blue); background: var(--blue-soft); }
