:root {
  --brand: #9A3412;
  --brand-ink: #7c2a0e;
  --brand-soft: #f5e9e0;
  --brand-line: #e7d2c4;
  --paper: #fbf8f1;
  --paper-deep: #f6f0e4;
  --card: #ffffff;
  --line: #e0d5c3;
  --line-soft: #ece4d6;
  --ink: #241f19;
  --ink-2: #4a4238;
  --muted: #7d7266;
  --ok: #3f6212;
  --ok-soft: #eef3e4;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --err: #991b1b;
  --err-soft: #fbebeb;
  --radius: 4px;
  --shadow-1: 0 1px 2px rgba(60, 45, 30, .06);
  --shadow-2: 0 6px 18px rgba(60, 45, 30, .10);
  --ease: cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1400px 700px at 50% -200px, #fffdf8 0%, rgba(255,255,255,0) 70%), var(--paper); color: var(--ink); font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: 15px; line-height: 1.75; }
a { color: var(--brand); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }
/* --- 顶部 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px 30px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--line);
}.topbar .logo { font-size: 19px; letter-spacing: 6px; color: var(--brand); flex: none; }
.topbar nav { display: flex; gap: 4px; font-size: 14px; }
.topbar nav a { color: var(--muted); padding: 4px 10px; border-radius: var(--radius); }
.topbar nav a:hover { background: var(--paper-deep); text-decoration: none; color: var(--ink); }
.topbar nav a.active { color: var(--brand); background: var(--brand-soft); }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar .who b { color: var(--ink); font-weight: normal; }
.topbar > a { font-size: 13px; color: var(--muted); white-space: nowrap; }
.topbar > a:hover { color: var(--brand); text-decoration: none; }
.page { max-width: 1400px; margin: 0 auto; padding: 26px 32px 72px; }
.page-wide { max-width: 1780px; }
.page-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: normal; letter-spacing: 3px; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.page-head .spacer { flex: 1; }
/* --- 按钮 ---------- */
.btn {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 6px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), transform .06s var(--ease), box-shadow .15s var(--ease);
}.btn:hover { border-color: var(--brand-line); color: var(--brand); background: #fffdfa; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-danger { color: var(--err); border-color: #e8cccc; background: #fff; }
.btn-danger:hover { background: var(--err-soft); border-color: #d9b1b1; color: var(--err); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--paper-deep); color: var(--ink); border-color: transparent; }
.btn-block { width: 100%; display: block; }
.btn-sm { padding: 2px 10px; font-size: 13px; }
/* --- 表单 ---------- */
.form label { display: block; margin-bottom: 15px; font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.form input[type=text], .form input[type=password], .form input[type=search],
.form input[type=file], .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}.form input:hover, .form select:hover, .form textarea:hover { border-color: #d3c4ac; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(154, 52, 18, .10); }
.form textarea { min-height: 62px; resize: vertical; }
.form input::placeholder { color: #b7ab9a; }
.hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.req::after { content: " *"; color: var(--brand); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input[type=search] {
  width: 240px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}.inline-form input[type=search]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(154, 52, 18, .10); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
/* --- 卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 20px 14px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              border-color .16s var(--ease);
}.card::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); opacity: 0; transition: opacity .16s var(--ease); }
.card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-2); transform: translateY(-2px); text-decoration: none; color: var(--ink); }
.card:hover::after { opacity: 1; }
.card .title { font-size: 17px; letter-spacing: 2px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}.card .meta > span:not(.sep) { overflow: hidden; text-overflow: ellipsis; }
.card .meta .code { color: #a99c8c; font-variant-numeric: tabular-nums; flex: none; }
.card .foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}.card .foot .sep { color: #cbbfae; }
.card .foot .spacer { flex: 1 1 auto; }
.card .stage { color: var(--brand); }
.card .time { color: #a99c8c; font-variant-numeric: tabular-nums; }
.empty { padding: 64px 0; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: #fffdf9; }
.empty strong { display: block; font-weight: normal; color: var(--ink-2); margin-bottom: 4px; letter-spacing: 1px; }
/* --- 表格 ---------- */
table.list {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}table.list th, table.list td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
table.list th { font-weight: normal; color: var(--muted); font-size: 12px; letter-spacing: 1px; background: var(--paper-deep); }
table.list tbody tr { transition: background .12s var(--ease); }
table.list tbody tr:hover { background: #fffdf8; }
table.list tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block;
  padding: 0 7px;
  font-size: 12px;
  line-height: 19px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
}.tag-on { color: var(--ok); border-color: #cfdcbb; background: var(--ok-soft); }
.tag-off { color: var(--err); border-color: #e8cccc; background: var(--err-soft); }
.tag-warn { color: var(--warn); border-color: #ecd8b6; background: var(--warn-soft); }
.tag-ro { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
/* --- 工作台 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}.breadcrumb .sep { color: #d3c7b6; user-select: none; padding: 0 2px; }
/* 可点击：带内边距的胶囊，hover/focus/active 三态反馈 */
.breadcrumb .crumb {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 3px;
  color: var(--muted);
  text-decoration: none;
  transition: color .16s var(--ease), background-color .16s var(--ease),
              transform .1s var(--ease);
}.breadcrumb .crumb:hover { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.breadcrumb .crumb:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; color: var(--brand); }
.breadcrumb .crumb:active { transform: translateY(1px); background: #f6e3d7; }
/* 当前页：不可点击，加粗加深 + 左侧小竖条，明确「你在这里」 */
.breadcrumb .cur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 9px;
  color: var(--ink);
  font-weight: 600;
  cursor: default;
  position: relative;
}.breadcrumb .cur::before {
  content: "";
  width: 2px;
  height: 12px;
  border-radius: 1px;
  background: var(--brand);
  position: absolute;
  left: 0;
}/* 窄屏：允许换行，隐藏分隔符的额外间距，字号略降 */
@media (max-width: 560px) {
  .breadcrumb { font-size: 12.5px; gap: 2px; }
  .breadcrumb .crumb, .breadcrumb .cur { padding: 3px 6px; }
  .breadcrumb .cur { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .breadcrumb .crumb, .breadcrumb .crumb:active { transition: none; transform: none; }
}
.book-hero { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 18px; box-shadow: var(--shadow-1); }
.book-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); border-radius: 4px 0 0 4px; }
.book-hero h2 { margin: 0; font-size: 21px; font-weight: normal; letter-spacing: 3px; }
.book-hero h2 small { font-size: 13px; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.book-hero .info { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.book-hero .info span { white-space: nowrap; }
.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}.stage .no { font-size: 10.5px; letter-spacing: .5px; color: #b3a795; font-variant-numeric: tabular-nums; }
.stage .name { font-size: 13px; letter-spacing: 1px; color: var(--ink-2); }
.stage .badge { margin-left: auto; font-size: 10px; padding: 0 5px; border-radius: 8px; background: #f2ece3; color: #a2947f; }
/* 问号：仅作视觉提示，说明用下方浮层 */
.stage .q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: none;
  border: 1px solid #cbbfae;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  color: #a99c8c;
  background: #fff;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}.stage:hover .q { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
/* 悬停浮层：深色气泡 + 箭头，位于节点上方 */
.stage .tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(260px, 74vw);
  padding: 9px 11px;
  border-radius: 6px;
  background: #2f2a24;
  color: #fdfaf5;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .2px;
  text-align: left;
  white-space: normal;
  box-shadow: 0 6px 18px rgba(47, 42, 36, .22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s var(--ease), transform .14s var(--ease), visibility .14s;
  z-index: 30;
}.stage .tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2f2a24;
}.stage:hover .tip, .stage:focus-visible .tip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
/* 左右两端的节点浮层向内收，避免溢出页面 */ .stages > :first-child .tip { left: 0; transform: translateX(0) translateY(4px); }
.stages > :first-child .tip::after { left: 22px; }
.stages > :first-child:hover .tip { transform: translateX(0) translateY(0); }
.stages > :nth-child(5) .tip, .stages > :nth-child(6) .tip { left: auto; right: 0; transform: translateX(0) translateY(4px); }
.stages > :nth-child(5) .tip::after, .stages > :nth-child(6) .tip::after { left: auto; right: 22px; }
.stages > :nth-child(5):hover .tip, .stages > :nth-child(6):hover .tip { transform: translateX(0) translateY(0); }
.stage.done { background: #fdfaf6; }
.stage.done .name { color: var(--brand); }
.stage.current { background: var(--brand-soft); border-color: var(--brand-line); box-shadow: var(--shadow-1); }
.stage.current .name { color: var(--brand); font-weight: 600; }
.stage.current .q { color: var(--brand); border-color: var(--brand-line); background: #fff; }
.stage.off { background: #fbfaf7; opacity: .72; }
a.stage:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--brand-line); text-decoration: none; }
a.stage:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 1024px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stage { padding: 9px 10px; }
  .stage .tip { max-width: 78vw; }
}
@media (prefers-reduced-motion: reduce) {
  .stage, .stage .tip { transition: none; }
}
.note {
  background: var(--warn-soft);
  border: 1px solid #efdfc2;
  color: #7a5a20;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.8;
}.note b { color: #6b4a12; }
/* 上传区 */ .upload-box { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
  text-align: center;
}.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.dropzone .picked { color: var(--brand); font-size: 13px; }
.upload-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.dot.run { background: var(--warn); animation: pulse 1.4s ease-in-out infinite; }
.dot.ok { background: var(--ok); }
.dot.err { background: var(--err); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}
/* --- 统计块 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); }
.stat .k { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.stat .v { font-size: 24px; line-height: 1.5; color: var(--ink); letter-spacing: 1px; }
.stat .v small { font-size: 12px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat.pass .v { color: var(--ok); }
.stat.fail .v { color: var(--err); }
.issue-list { display: flex; flex-direction: column; gap: 10px; }
.issue { border: 1px solid var(--line-soft); border-left: 3px solid var(--warn); border-radius: 2px; background: #fffdf9; padding: 10px 14px; font-size: 13px; }
.issue.error { border-left-color: var(--err); background: #fffafa; }
.issue .head { color: var(--ink-2); margin-bottom: 2px; }
.issue .body { color: var(--muted); word-break: break-word; }
.chip { display: inline-block; font-size: 12px; color: var(--brand); background: var(--brand-soft); border-radius: 2px; padding: 0 6px; margin-right: 6px; }
/* --- 弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 25, .34);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}.mask.show { display: flex; animation: fade .16s var(--ease); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 560px;
  max-width: 100%;
  max-height: 86vh;
  overflow: auto;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(40, 30, 20, .22);
  animation: rise .18s var(--ease);
}@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.modal h3 { margin: 0 0 18px; font-size: 16px; font-weight: normal; letter-spacing: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
/* --- 提示 ---------- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -8px);
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  z-index: 60;
  box-shadow: var(--shadow-2);
  max-width: 80vw;
}.toast.show { opacity: .96; transform: translate(-50%, 0); }
.msg { font-size: 13px; margin: 4px 0 12px; padding: 8px 10px; border-radius: 2px; }
.msg-error { color: var(--err); background: var(--err-soft); border: 1px solid #eccfcf; }
.msg-ok { color: var(--ok); background: var(--ok-soft); border: 1px solid #d7e2c4; }
/* --- 登录 / 改密 ---------- */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -120px, #fff 0%, rgba(255,255,255,0) 65%),
    var(--paper);
}.auth-card {
  width: min(384px, 100%);
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 34px 26px;
  box-shadow: var(--shadow-2);
}.auth-card .brand {
  margin: 0;
  font-size: 26px;
  letter-spacing: 12px;
  font-weight: normal;
  color: var(--brand);
  text-align: center;
  text-indent: 12px;
}.auth-card .brand-sub { margin: 8px 0 28px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.auth-card .hint { text-align: center; margin-top: 18px; }
/* --- 分页 ---------- */
.pager {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
}.pager a { padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2); }
.pager a:hover { border-color: var(--brand-line); color: var(--brand); text-decoration: none; }
/* --- 骨架/加载 ---------- */
.skeleton { height: 14px; border-radius: 2px; background: linear-gradient(90deg, #f1ebdf 25%, #f7f2e8 37%, #f1ebdf 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
/* --- 响应式 ---------- */
/* --- 角色下拉 ---------- */
.role-select {
  font-family: inherit;
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}.role-select:hover { border-color: var(--brand-line); color: var(--brand); }
.role-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(154,52,18,.10); }
/* --- 复选 / 折叠区 ---------- */
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px !important;
  font-size: 13px !important;
  color: var(--ink-2) !important;
  cursor: pointer;
  user-select: none;
}.check input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); cursor: pointer; }
details.more { margin: 4px 0 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.more summary { font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; padding: 2px 0; transition: color .15s var(--ease); }
details.more summary:hover { color: var(--brand); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "＋"; display: inline-block; width: 14px; color: var(--brand); }
details.more[open] summary::before { content: "－"; }
details.more .more-body { padding-top: 12px; animation: fade .16s var(--ease); }
/* --- 存疑行 ---------- */
tr.row-disputed td { background: #fffaf3; }
tr.row-disputed td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
/* --- 解析进度 ---------- */
.parse-box { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fffdf9; }
.parse-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.parse-head .spacer { flex: 1; }
.parse-eta { color: var(--brand); font-size: 12px; white-space: nowrap; }
.progress { position: relative; height: 6px; margin-top: 9px; border-radius: 3px; background: #efe7d8; overflow: hidden; }
.progress .bar { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--brand) 0%, #c2551f 100%); transition: width .45s cubic-bezier(.2,.7,.3,1); }
.progress.indeterminate .bar { width: 32%; animation: slide 1.5s ease-in-out infinite; transition: none; }
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}
/* 解析状态行：左文不换行、右侧元信息固定 */ .parse-main { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parse-meta, .parse-eta { flex: none; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.parse-meta { color: var(--muted); }
@media (max-width: 560px) {
  .parse-head { flex-wrap: wrap; }
  .parse-main { flex: 1 1 100%; }
  .parse-meta, .parse-eta { font-size: 12px; }
}
/* --- 体检建议 ---------- */
.advice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.9;
  border: 1px solid var(--line);
  background: #fff;
}.advice strong { letter-spacing: 1px; }
.advice.ok { background: var(--ok-soft); border-color: #d7e2c4; color: #37500f; }
.advice.warn { background: var(--warn-soft); border-color: #efdfc2; color: #6b4a12; }
.advice-steps { margin: 8px 0 4px; }
.advice-steps > div { margin-bottom: 2px; }
.advice-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* 书架卡片：时间单独一行 */ .card .foot-time { margin-top: 6px; font-size: 12px; color: #a99c8c; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
/* 书架卡片：五段流程（前二 / 前一 / 当前 / 后一 / 后二） */
.card .flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.6;
}.flow-side { display: flex; align-items: center; gap: 5px; min-width: 0; }
.flow-side.left { justify-content: flex-end; }
.flow-side.right { justify-content: flex-start; }
.flow-side > span { white-space: nowrap; }
.fstep.done { display: inline-flex; align-items: center; gap: 4px; color: #a4674a; opacity: .85; }
.fstep.done::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #c08a6a; flex: none; }
.fstep.todo { display: inline-flex; align-items: center; gap: 4px; color: #bdb2a4; }
.fstep.todo::before { content: ""; width: 4px; height: 4px; border-radius: 50%; border: 1px solid #cfc3b2; flex: none; }
.fstep.cur { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); letter-spacing: 1px; font-weight: bold; }
.fstep.cur::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; box-shadow: 0 0 0 2px rgba(154, 52, 18, .10); animation: flow-pulse 1.9s ease-in-out infinite; }
.farrow { flex: none; width: 14px; height: 1px; position: relative; }
.farrow::after { content: ""; position: absolute; right: -1px; top: -2px; width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.farrow.solid {
  color: #c08a6a;
  background-image: linear-gradient(90deg,
      rgba(192, 138, 106, 0) 0, rgba(192, 138, 106, .95) 50%, rgba(192, 138, 106, 0) 100%);
  background-size: 14px 100%;
  animation: flow-run 1.35s linear infinite;
}.farrow.dashed { color: #d3c7b6; background-image: linear-gradient(90deg, #d3c7b6 0 4px, transparent 4px 8px); background-size: 8px 100%; background-repeat: repeat-x; }
@keyframes flow-run { from { background-position: 0 0; } to { background-position: 14px 0; } }
@keyframes flow-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(154, 52, 18, .10); }
  50% { box-shadow: 0 0 0 5px rgba(154, 52, 18, .18); }
}
@media (prefers-reduced-motion: reduce) {
  .farrow.solid, .fstep.cur::before { animation: none; }
}
/* 批量拆解进度条 */
.batch-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: #fffdf9; font-size: 13px; color: var(--ink-2); }
/* 阶段节点上的问号：悬停/聚焦提示该步骤含义 */
.stage .q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border: 1px solid #cbbfae;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  color: #a99c8c;
  background: #fff;
  cursor: help;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}.stage:hover .q, .stage:focus-visible .q { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.stage.current .q { color: #fff; border-color: rgba(255,255,255,.8); background: transparent; }
.stage.current:hover .q { background: rgba(255,255,255,.22); }
/* --- 样式自测补充（一致性 / 响应式 / 兼容） ---------- */
/* 1. 表格在窄屏可横向滚动，避免整页溢出 */ .table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 620px; }
@media (max-width: 720px) {
  .table-wrap > table { min-width: 560px; font-size: 12.5px; }
  .table-wrap > table th, .table-wrap > table td { padding: 8px 10px; }
}
/* 2. 统一禁用态：任何按钮、下拉、输入 */
.btn:disabled, .btn[disabled], button:disabled,
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn:disabled:hover, .btn[disabled]:hover { background: var(--card); color: var(--ink-2); }
/* 3. 统一加载态：骨架条与行内忙碌提示 */ .is-busy { opacity: .6; pointer-events: none; }
/* 4. 兼容：backdrop-filter 不可用时给顶栏实色底，避免透明看不清 */
@supports not ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .topbar { background: var(--paper); }
}
/* 5. 兼容：line-clamp 标准属性（Safari 旧版只认 -webkit-） */ .stage .desc, .advice-steps, .q-item .m { line-clamp: 3; }
/* 6. 触屏目标尺寸：链接与按钮不小于 32px 高 */
@media (pointer: coarse) {
  .btn-sm { min-height: 32px; padding: 6px 10px; }
  .breadcrumb .crumb { padding: 5px 8px; }
}
/* 7. 长文本兜底：书名、单元名不撑破容器 */ .title, .stage .name, .breadcrumb .cur { overflow-wrap: anywhere; }
.p-list li, .issue .head { overflow-wrap: anywhere; }
/* 登录/改密：窄屏收紧内边距与品牌字距，防止横向溢出 */
@media (max-width: 480px) {
  .auth-body { padding: 16px; }
  .auth-card { padding: 28px 20px 20px; }
  .auth-card .brand { font-size: 22px; letter-spacing: 8px; }
  .brand-sub { letter-spacing: 2px; font-size: 12px; }
}
/* --- 顶栏响应式（窄屏不溢出） ---------- */
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .topbar .logo { font-size: 16px; letter-spacing: 4px; }
  .topbar nav { gap: 0; font-size: 13px; }
  .topbar nav a { padding: 4px 8px; }
  .topbar .who { display: none; }
  .topbar > a { font-size: 12.5px; }
}
@media (max-width: 420px) {
  .topbar { padding: 9px 12px; }
  .topbar nav a { padding: 4px 6px; }
}
/* --- 以下规则由回滚合并补回（原样式表被误删） ---------- */
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); text-decoration: none; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-1); }
.panel h3 { margin: 0 0 14px; font-size: 15px; font-weight: normal; letter-spacing: 2px; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.kv { display: grid; grid-template-columns: 122px 1fr; gap: 9px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
/* --- 物料包浏览 ---------- */
.mat-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mat-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mat-tab { font-family: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: all .15s var(--ease); }
.mat-tab:hover { border-color: var(--brand-line); color: var(--brand); }
.mat-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mat-tab .n { margin-left: 6px; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.mat-search { flex: 1 1 220px; min-width: 160px; font-family: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.mat-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(154,52,18,.10); }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mat-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 13px 14px; box-shadow: var(--shadow-1); transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.mat-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.mat-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mat-head h3 { margin: 0; font-size: 16px; letter-spacing: 1px; font-weight: normal; }
.mat-type { font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 9px; padding: 1px 7px; }
.mat-hans { font-size: 12px; color: var(--muted); }
.mat-line { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.mat-line .k { color: var(--muted); margin-right: 6px; }
.mat-note { font-size: 12.5px; color: #7d6b57; line-height: 1.8; margin-top: 4px; }
.mat-rels { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.mat-refs { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 11px; color: var(--muted); background: #f5efe5; border-radius: 3px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.chip-rel { color: var(--brand); background: var(--brand-soft); }
.mat-more { margin-top: 10px; }
.mat-src { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.src-p { font-size: 13px; line-height: 1.95; margin: 0 0 6px; color: var(--ink-2); }
.src-p .no { color: #b3a795; font-size: 11px; margin-right: 6px; }
.src-p.hit { background: #fff6ee; box-shadow: inset 2px 0 0 var(--brand); padding-left: 6px; }
@media (max-width: 560px) {
  .mat-grid { grid-template-columns: 1fr; }
}
/* --- 知识图谱 ---------- */
.g-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.g-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.g-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.g-legend b { color: var(--muted); font-weight: normal; font-variant-numeric: tabular-nums; }
.g-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: stretch; }
.g-svg { width: 100%; height: calc(100vh - 250px); min-height: 660px; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(circle at 50% 40%, #fffdf8 0%, #fbf7ee 100%); cursor: grab; }
.g-edge { stroke: #c9bba6; stroke-width: 1; stroke-opacity: .35; }
.g-edge-label { font-size: 9px; fill: #9a8f82; opacity: 0; pointer-events: none; }
.g-node { cursor: pointer; transition: fill-opacity .15s var(--ease); }
.g-label { font-size: 12.5px; fill: #5c5147; pointer-events: none; paint-order: stroke; stroke: #fffdf8; stroke-width: 2.4px; }
.g-side { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px; overflow: auto; max-height: calc(100vh - 250px); min-height: 660px; }
.g-side-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.g-side-head h3 { margin: 0; font-size: 17px; letter-spacing: 1px; font-weight: normal; }
.g-side-rels { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.g-side-rels .k { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.g-rel { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.g-rel .p { color: var(--brand); }
@media (max-width: 900px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-side { max-height: 320px; min-height: 0; }
  .g-svg { height: 56vh; }
}
/* 段落浮层：悬停「段 N」显示原文与上下文 */
.para-tip {
  position: fixed;
  z-index: 60;
  display: none;
  width: min(420px, 78vw);
  max-height: 46vh;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 6px;
  background: #2f2a24;
  color: #fdfaf5;
  box-shadow: 0 10px 26px rgba(47, 42, 36, .28);
  font-size: 12.5px;
  line-height: 1.9;
  pointer-events: none;
}
.para-tip-head { font-size: 11px; letter-spacing: 1px; color: #d8c8b4; margin-bottom: 6px; }
.para-tip-p { margin: 0 0 7px; }
.para-tip-p:last-child { margin-bottom: 0; }
.para-tip-p .no { color: #b3a795; font-size: 10.5px; margin-right: 6px; }
.para-tip-p.hit { color: #fff; background: rgba(255, 255, 255, .09); border-left: 2px solid #e2a06f; padding-left: 6px; margin-left: -6px; }
.refs-scroll { max-height: 108px; overflow: auto; padding-right: 4px; }
.chip-para { cursor: help; }
.chip-para:hover, .chip-para:focus-visible { background: var(--brand-soft); color: var(--brand); outline: none; }
/* 关系行：对端节点可点，段号可悬停看上下文 */ .g-rel-other { cursor: pointer; border-bottom: 1px dotted #cbbfae; }
.g-rel-other:hover { color: var(--brand); border-bottom-color: var(--brand); }
/* --- 工作台操作按钮组：统一尺寸/配色/圆角/图标/状态 ---------- */
.action-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; margin: 14px 0 4px; }
.btn-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .3px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.btn-act .ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-act { width: 100%; }
.btn-act:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); border-color: var(--brand-line); color: var(--brand); background: #fffdfa; text-decoration: none; }
.btn-act:active { transform: translateY(1px); box-shadow: none; }
.btn-act:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-act:disabled, .btn-act[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
/* 层级：主操作（实心朱砂）> 流程推进（浅朱砂）> 查看类（描边） */ .btn-act.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-act.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn-act.btn-primary:active { background: var(--brand-ink); }
.btn-act.btn-accent { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); grid-column: 1 / -1; }
.btn-act.btn-accent:hover { background: #fbe9dc; border-color: var(--brand); color: var(--brand-ink); }
.btn-act.btn-line { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-act.btn-line:hover { border-color: var(--brand-line); }
@media (max-width: 640px) {
  .action-bar { gap: 8px; }
  .btn-act { flex: 1 1 calc(50% - 4px); min-width: 132px; }
}
@media (max-width: 380px) {
  .btn-act { flex: 1 1 100%; }
}

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .stages { flex-wrap: wrap; }
  .stages .stage { flex: 1 1 24%; border-bottom: 1px solid var(--line-soft); }
  .page { padding: 20px 16px 56px; }
  .topbar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .inline-form input[type=search] { width: 160px; }
  .kv { grid-template-columns: 96px 1fr; }
}

/* 图谱工具条与全屏 */
.g-tools { display: flex; align-items: center; gap: 6px; }
.g-tools .btn-sm { min-width: 32px; }
.g-wrap.g-full { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; padding: 12px; background: #fbf8f1; }
.g-wrap.g-full .g-svg { height: calc(100vh - 24px); min-height: 0; border-radius: 6px; }
.g-wrap.g-full .g-side { max-height: calc(100vh - 24px); min-height: 0; }
body.g-locked { overflow: hidden; }

/* 顶栏品牌语 */
.topbar .slogan { font-size: 12px; letter-spacing: 1.6px; color: #a99c8c; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 860px) { .topbar .slogan { display: none; } }
