/* 巡鉴 · 集团巡视巡察整改闭环智能平台
 * 设计语言：纸质案卷 / 朱批 / 印章 / 档案签 / 三级审批
 * 纯静态，无外部字体与图片。
 */

:root {
  --paper: #efe8d7;
  --paper-2: #f8f2e4;
  --paper-3: #fdf9ef;
  --paper-4: #f4ecdc;
  --ink: #211e18;
  --ink-2: #3f3a2f;
  --muted: #746d5d;
  --faint: #9b9280;
  --line: #d7cbb4;
  --line-strong: #c8ba9e;
  --line-soft: #e6ddc9;
  --red: #a33227;
  --red-2: #8a281e;
  --red-soft: #f4e4da;
  --green: #3d674c;
  --green-soft: #e3eadf;
  --amber: #a5741f;
  --amber-soft: #f4e8cb;
  --blue: #3f5b6b;
  --blue-soft: #e3e9e9;
  --white: #fffdf7;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --kai: "KaiTi", "STKaiti", "Kaiti SC", "Noto Serif SC", serif;
  --num: "Georgia", "Times New Roman", "Cambria", serif;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 26px rgba(66, 52, 24, .055);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background-color: #e5dcc8;
  background-image:
    radial-gradient(1100px 500px at 8% -10%, rgba(255, 252, 242, .85), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(238, 222, 190, .75), transparent 58%),
    repeating-linear-gradient(0deg, rgba(90, 76, 48, .018) 0 1px, transparent 1px 4px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { outline: none; }
::selection { background: rgba(163, 50, 39, .16); }

.app {
  position: relative;
  height: 100%;
  min-height: 820px;
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(700px 260px at 15% 0%, rgba(255, 253, 245, .7), transparent 70%),
    linear-gradient(180deg, #f4edde 0%, #eee6d4 46%, #f0e9d9 100%);
  box-shadow: 0 0 90px rgba(70, 54, 24, .14);
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(70, 58, 36, .04) .55px, transparent .7px),
    repeating-linear-gradient(90deg, rgba(110, 92, 58, .012) 0 1px, transparent 1px 3px);
  background-size: 3px 3px, 3px 100%;
  opacity: .8;
}

/* ============ 报头 ============ */

.mast {
  position: relative;
  z-index: 2;
  flex: 0 0 92px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 26px;
  border-bottom: 2px solid var(--red);
  background: linear-gradient(180deg, rgba(255, 253, 246, .48), rgba(255, 250, 238, .05));
}

.mast::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: -6px;
  height: 1px;
  background: rgba(33, 30, 24, .26);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  padding-right: 22px;
  border-right: 1px solid rgba(33, 30, 24, .14);
}

.seal {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #b33a2d, #8c271e 72%);
  box-shadow: 0 3px 8px rgba(90, 25, 18, .22), 0 0 0 1px rgba(255, 244, 226, .3) inset;
  transform: rotate(-1.6deg);
}

.seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 243, 224, .58);
}

.seal span {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: #f8efdc;
  opacity: .96;
  transform: translateY(-1px);
}

.seal i {
  position: absolute;
  right: 3px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  background: rgba(80, 20, 12, .35);
}

.brand-name {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: .17em;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.brand-name em {
  font-family: var(--num);
  font-size: 9px;
  font-style: normal;
  letter-spacing: .26em;
  color: var(--faint);
  margin-left: 8px;
  vertical-align: 3px;
}

.brand-sub {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}

.tabs {
  flex: 1 1 auto;
  min-width: 0;
  height: 92px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
}

.tab {
  position: relative;
  height: 92px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;
}

.tab:hover { background: rgba(163, 50, 39, .045); }

.tab i {
  align-self: flex-start;
  margin-top: 27px;
  font-family: var(--num);
  font-style: normal;
  font-size: 9px;
  color: var(--faint);
  letter-spacing: .02em;
}

.tab span { display: flex; flex-direction: column; gap: 3px; text-align: left; }

.tab b {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink-2);
}

.tab small {
  font-family: var(--num);
  font-size: 7px;
  letter-spacing: .19em;
  color: var(--faint);
}

.tab.active { border-bottom-color: var(--red); background: rgba(163, 50, 39, .035); }
.tab.active b { color: var(--red); }
.tab.active i { color: var(--red); }

.tab-badge {
  align-self: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper-3);
  font-family: var(--num);
  font-size: 8.5px;
  font-style: normal;
  display: grid;
  place-items: center;
}

.tab.active .tab-badge { background: var(--red); }

.mast-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(33, 30, 24, .14);
}

.log-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, .35);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--ink-2);
  transition: .18s ease;
}

.log-btn:hover { background: rgba(255, 253, 247, .75); border-color: var(--ink-2); }

.log-btn b {
  font-family: var(--num);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--paper-3);
  background: var(--red);
  min-width: 18px;
  padding: 1px 4px;
  text-align: center;
}

.role-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, .32);
  transition: .18s ease;
}

.role-box:hover { background: rgba(255, 253, 247, .7); }

.role-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-3);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 15px;
}

.role-txt small {
  display: block;
  font-size: 7.5px;
  letter-spacing: .12em;
  color: var(--faint);
  margin-bottom: 2px;
}

.role-txt b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.role-box select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ============ 副栏 ============ */

.subbar {
  position: relative;
  z-index: 2;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 26px;
  border-top: 1px solid rgba(33, 30, 24, .12);
  border-bottom: 1px solid rgba(33, 30, 24, .16);
  background: rgba(255, 252, 244, .26);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: .045em;
}

.sb-l { display: flex; align-items: center; gap: 17px; min-width: 0; }
.sb-l > span { white-space: nowrap; }
.sb-l b { font-family: var(--num); font-weight: 600; color: var(--ink-2); }

.docno {
  font-family: var(--kai);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--red);
}

.sb-basis { padding-left: 16px; border-left: 1px solid var(--line); color: var(--faint); }

.sb-r { display: flex; align-items: center; gap: 14px; white-space: nowrap; }

.sb-live { display: flex; align-items: center; gap: 6px; color: var(--green); }

.sb-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 103, 76, .12);
}

.sb-ver { font-family: var(--num); font-size: 8px; letter-spacing: .16em; color: var(--faint); }

/* ============ 舞台与卡片 ============ */

.stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 20px 12px;
  overflow: hidden;
}

.view {
  height: 100%;
  min-height: 0;
  display: grid;
  gap: 14px;
  animation: viewIn .38s cubic-bezier(.2, .7, .25, 1) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.card {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(253, 249, 239, .94), rgba(247, 240, 226, .93));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.card::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(33, 30, 24, .045);
  pointer-events: none;
  z-index: 0;
}

.card-h {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px 9px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 253, 246, .45), rgba(255, 252, 244, 0));
}

.ch-no {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1;
  color: var(--red);
  border: 1px solid rgba(163, 50, 39, .38);
}

.card-h h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
  white-space: nowrap;
}

.ch-en {
  margin-top: 2px;
  font-family: var(--num);
  font-size: 7px;
  letter-spacing: .19em;
  color: var(--faint);
  white-space: nowrap;
}

.sp { flex: 1 1 auto; }

.card-f {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 9px;
  color: var(--faint);
  letter-spacing: .03em;
}

.card-b {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  padding: 9px 14px;
  overflow: auto;
}

.card-b::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.queue-list::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.card-b::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.queue-list::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb {
  background: rgba(33, 30, 24, .2);
}

/* ============ 通用元件 ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 247, .4);
  font-size: 10px;
  letter-spacing: .03em;
  color: var(--ink-2);
  transition: .16s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--white); border-color: var(--ink-2); }

.btn.red {
  background: var(--red);
  border-color: var(--red);
  color: #fbf3e3;
}

.btn.red:hover { background: var(--red-2); border-color: var(--red-2); }

.btn.green { border-color: rgba(61, 103, 76, .5); color: var(--green); background: rgba(61, 103, 76, .05); }
.btn.green:hover { background: rgba(61, 103, 76, .1); border-color: var(--green); }

.btn.ghost { border-color: transparent; background: transparent; color: var(--red); padding: 2px 4px; }
.btn.ghost:hover { background: rgba(163, 50, 39, .05); border-color: transparent; }

.btn[disabled], .btn.disabled {
  opacity: .38;
  cursor: not-allowed;
  filter: grayscale(.3);
}

.btn[disabled]:hover { background: rgba(255, 253, 247, .4); border-color: var(--line-strong); }
.btn.red[disabled]:hover { background: var(--red); border-color: var(--red); }

.btn-sm { padding: 3px 8px; font-size: 9px; }

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--red);
  font-size: 9px;
  letter-spacing: .03em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(163, 50, 39, .35);
}

.rule-chip, .src-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid rgba(163, 50, 39, .32);
  color: var(--red);
  font-family: var(--num);
  font-size: 8px;
  letter-spacing: .03em;
  background: rgba(163, 50, 39, .035);
  cursor: pointer;
}

.src-chip { color: var(--blue); border-color: rgba(63, 91, 107, .32); background: rgba(63, 91, 107, .035); }

.rule-chip:hover, .src-chip:hover { background: rgba(163, 50, 39, .09); }

.tone-gray { --tone: #8b8476; }
.tone-amber { --tone: #a5741f; }
.tone-blue { --tone: #3f5b6b; }
.tone-red { --tone: #a33227; }
.tone-green { --tone: #3d674c; }
.tone-dark { --tone: #6b2a22; }

/* ============ 总览 ============ */

.view-overview { grid-template-rows: 128px minmax(0, 1.18fr) minmax(0, .92fr); }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }

.kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 12px 15px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(255, 253, 246, .96), rgba(246, 238, 222, .9));
  box-shadow: var(--shadow);
}

.kpi::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(33, 30, 24, .045);
  pointer-events: none;
}

.kpi-h {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  letter-spacing: .13em;
  color: var(--muted);
}

.kpi-q {
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--num);
  font-size: 8px;
  color: var(--faint);
  flex: 0 0 auto;
}

.kpi-q:hover { border-color: var(--red); color: var(--red); }

.kpi-v {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--num);
  font-size: 39px;
  line-height: .92;
  letter-spacing: -.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-v small {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
}

.kpi-f {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .02em;
}

.kpi-f em { font-style: normal; color: var(--red); white-space: nowrap; }

.kpi-mark {
  position: absolute;
  right: 4px;
  bottom: -14px;
  font-family: var(--serif);
  font-size: 62px;
  line-height: 1;
  color: rgba(33, 30, 24, .045);
  pointer-events: none;
  z-index: 0;
}

.kpi.hero {
  background: linear-gradient(148deg, #a93a2d 0%, #8b281f 78%);
  border-color: #7d241c;
  color: #f8efdd;
}

.kpi.hero::after { border-color: rgba(255, 248, 236, .16); }
.kpi.hero .kpi-h, .kpi.hero .kpi-f { color: rgba(250, 239, 221, .72); }
.kpi.hero .kpi-v { color: #fff9ee; padding-right: 68px; }
.kpi.hero .kpi-v small { color: rgba(255, 249, 238, .66); }
.kpi.hero .kpi-f em { color: #f2d7a4; }
.kpi.hero .kpi-mark { color: rgba(255, 255, 255, .09); }
.kpi.hero .kpi-q { border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .65); }
.kpi.hero .kpi-q:hover { border-color: #fff; color: #fff; }

.kpi-ring {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translateY(-42%);
  z-index: 1;
}

.kpi-ring circle { fill: none; stroke-width: 6.5; }
.kpi-ring .bg { stroke: rgba(255, 255, 255, .17); }
.kpi-ring .fg { stroke: #f3dbaa; transform: rotate(-90deg); transform-origin: 50% 50%; }
.kpi-ring text { font-family: var(--num); font-size: 15px; fill: #fff9ee; text-anchor: middle; }

.ov-mid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr); gap: 14px; min-height: 0; }
.ov-low { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .94fr) minmax(0, .8fr); gap: 14px; min-height: 0; }

/* 单位推进 */
.unit-body { padding: 2px 14px 0; display: flex; flex-direction: column; }

.unit-row {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px dashed var(--line-soft);
}

.unit-row:last-child { border-bottom: 0; }

.u-name { min-width: 0; }

.u-name b {
  display: block;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.u-name small {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--faint);
  white-space: nowrap;
}

.u-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }

.pcell {
  position: relative;
  height: 37px;
  min-width: 0;
  padding: 0 8px 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .42);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.pcell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--tone, #8b8476);
}

.pcell span {
  font-family: var(--num);
  font-size: 9.5px;
  letter-spacing: .03em;
  color: var(--ink-2);
  line-height: 1.1;
}

.pcell b {
  font-size: 8.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcell.closed { background: rgba(61, 103, 76, .07); }
.pcell.review { background: rgba(63, 91, 107, .055); }
.pcell.approve { background: rgba(163, 50, 39, .06); }
.pcell.returned { background: rgba(107, 42, 34, .05); }

.pcell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(60, 46, 22, .11);
  background: var(--white);
}

.pcell.deadline::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
}

.u-rate { text-align: right; min-width: 0; }

.u-rate b {
  font-family: var(--num);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}

.u-rate small {
  display: block;
  margin-top: 1px;
  font-size: 7.5px;
  letter-spacing: .12em;
  color: var(--faint);
}

.u-bar { height: 3px; margin-top: 3px; background: var(--line-soft); position: relative; }
.u-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); }

.card-f .lg { display: flex; align-items: center; gap: 5px; }
.card-f .lg i { width: 4px; height: 4px; border-radius: 50%; background: var(--tone); }

/* AI 研判 */
.ai-card { background: linear-gradient(180deg, rgba(253, 248, 236, .96), rgba(248, 240, 223, .94)); }

.ai-card::before {
  content: "研";
  position: absolute;
  right: 12px;
  top: 38px;
  font-family: var(--kai);
  font-size: 84px;
  line-height: 1;
  color: rgba(163, 50, 39, .055);
  pointer-events: none;
  z-index: 0;
}

.ai-card .card-b { display: flex; flex-direction: column; }
.ai-card .ai-finding { flex: 0 0 auto; }
.ai-card .ai-basis { margin-top: auto; }

.ai-intro {
  position: relative;
  z-index: 1;
  padding: 1px 0 7px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--kai);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.ai-finding {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  text-align: left;
  border-bottom: 1px dashed var(--line-soft);
  transition: background .16s ease;
}

.ai-finding:last-child { border-bottom: 0; }
.ai-finding:hover { background: rgba(163, 50, 39, .035); }

.ai-rank {
  font-family: var(--num);
  font-size: 9.5px;
  color: var(--red);
  border-top: 1px solid var(--red);
  padding-top: 2px;
  height: 16px;
}

.ai-copy b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.ai-copy p {
  margin: 0 0 5px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: justify;
}

.ai-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.ai-meta i {
  font-style: normal;
  font-size: 8px;
  letter-spacing: .03em;
  padding: 1px 4px;
  border: 1px solid var(--line);
  color: var(--faint);
}

.ai-meta i.rule { font-family: var(--num); color: var(--red); border-color: rgba(163, 50, 39, .32); }
.ai-meta i.id { font-family: var(--num); color: var(--blue); border-color: rgba(63, 91, 107, .3); }
.ai-meta i.conf { font-family: var(--num); color: var(--muted); }

.ai-live { display: flex; align-items: center; gap: 5px; font-size: 8.5px; color: var(--green); }
.ai-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(61, 103, 76, .12); }
.ai-foot { font-family: var(--num); letter-spacing: .02em; }

/* 结构矩阵 */
.mx-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px 46px 46px 34px;
  gap: 4px;
  align-items: center;
  padding: 0 0 5px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--faint);
  text-align: center;
}

.mx-head span:first-child { text-align: left; }

.mx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px 46px 46px 34px;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.mx-row:last-child { border-bottom: 0; }

.mx-label {
  font-size: 10px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}

.mx-label small { display: block; font-size: 7.5px; color: var(--faint); letter-spacing: .05em; }

.mx-cell {
  height: 23px;
  display: grid;
  place-items: center;
  font-family: var(--num);
  font-size: 10.5px;
  color: rgba(33, 30, 24, .38);
  border: 1px solid transparent;
  background: rgba(33, 30, 24, .025);
  transition: .15s ease;
}

.mx-cell.has { color: var(--ink); cursor: pointer; border-color: rgba(33, 30, 24, .08); }
.mx-cell.has:hover { border-color: var(--red); background: rgba(163, 50, 39, .09); }
.mx-cell.major.has { background: rgba(163, 50, 39, .1); color: var(--red); }
.mx-cell.large.has { background: rgba(165, 116, 31, .1); color: var(--amber); }
.mx-cell.normal.has { background: rgba(63, 91, 107, .08); color: var(--blue); }
.mx-total { font-family: var(--num); font-size: 10px; color: var(--muted); text-align: center; }

/* 逾期 */
.od-list { display: flex; flex-direction: column; }
.od-item {
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 12px;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
  text-align: left;
}
.od-item:last-child { border-bottom: 0; }
.od-item:hover .od-copy b { color: var(--red); }

.od-days {
  font-family: var(--num);
  font-size: 8.5px;
  color: #fff8ec;
  background: var(--red);
  padding: 3px 2px;
  text-align: center;
  letter-spacing: .01em;
  white-space: nowrap;
}

.od-days.near { background: var(--amber); }

.od-copy { min-width: 0; }
.od-copy b {
  display: block;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}
.od-copy small { display: block; margin-top: 2px; font-size: 8px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-arrow { font-family: var(--num); color: var(--faint); font-size: 11px; }

/* 留痕 */
.trail-list { display: flex; flex-direction: column; }
.trail {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.trail:last-child { border-bottom: 0; }
.trail time { font-family: var(--num); font-size: 8px; color: var(--faint); padding-top: 1px; }
.trail b { font-size: 9.5px; font-weight: 600; color: var(--ink-2); }
.trail b em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; font-size: 8px; }
.trail p { margin: 1px 0 0; font-size: 8.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ 问题台账 ============ */

.view-ledger { grid-template-columns: 236px minmax(0, 1fr); }

.ledger-side { overflow: hidden; }
.filter-search { flex: 0 0 auto; padding: 10px 12px 8px; border-bottom: 1px solid var(--line-soft); }

.search-box { position: relative; }

.search-box::before {
  content: "⌕";
  position: absolute;
  left: 8px;
  top: 3px;
  font-size: 15px;
  line-height: 1;
  color: var(--faint);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 30px;
  padding: 0 8px 0 25px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .45);
  font-size: 10px;
  color: var(--ink);
}

.search-box input:focus { border-color: var(--ink-2); background: var(--white); }
.search-box input::placeholder { color: var(--faint); }

.filter-block { flex: 0 0 auto; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }

.filter-block h4 {
  margin: 0 0 6px;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .15em;
  color: var(--faint);
}

.chips { display: flex; flex-wrap: wrap; gap: 4px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .28);
  font-size: 9px;
  color: var(--ink-2);
  transition: .15s ease;
  white-space: nowrap;
}

.chip b { font-family: var(--num); font-size: 8px; font-weight: 400; color: var(--faint); }
.chip:hover { border-color: var(--ink-2); background: var(--white); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper-3); }
.chip.active b { color: rgba(255, 255, 255, .55); }

.filter-summary {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 9px;
  color: var(--muted);
  background: rgba(255, 253, 247, .18);
}

.filter-summary b { font-family: var(--num); font-size: 15px; color: var(--red); margin-right: 2px; }

.ledger-main { overflow: hidden; }

.ledger-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 9px;
  color: var(--muted);
}

.ledger-toolbar .sp { flex: 1; }

.table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 10px;
  text-align: left;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .13em;
  color: var(--faint);
  background: #f3ebdb;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.ledger-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .14s ease;
}

.ledger-table tbody tr:hover { background: rgba(163, 50, 39, .036); }
.ledger-table tbody tr:last-child { border-bottom: 0; }
.ledger-table td { padding: 7px 10px; vertical-align: middle; }

.ledger-table .c-no { width: 82px; }
.ledger-table .c-problem { width: auto; }
.ledger-table .c-sev { width: 58px; }
.ledger-table .c-owner { width: 116px; }
.ledger-table .c-due { width: 112px; }
.ledger-table .c-prog { width: 96px; }
.ledger-table .c-status { width: 82px; }
.ledger-table .c-op { width: 38px; text-align: right; }

.pid { display: block; font-family: var(--num); font-size: 10.5px; color: var(--red); letter-spacing: .02em; }
.pid-sub { display: block; margin-top: 1px; font-family: var(--num); font-size: 7.5px; color: var(--faint); }

.c-problem b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-problem small {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sev {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid;
  font-size: 8.5px;
  letter-spacing: .06em;
}

.sev.major { color: var(--red); border-color: rgba(163, 50, 39, .4); background: rgba(163, 50, 39, .05); }
.sev.large { color: var(--amber); border-color: rgba(165, 116, 31, .4); background: rgba(165, 116, 31, .05); }
.sev.normal { color: var(--muted); border-color: var(--line); background: rgba(33, 30, 24, .02); }

.st { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; white-space: nowrap; }
.st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tone, #8b8476); }
.st-pending { --tone: #8b8476; color: #6f685b; }
.st-ongoing { --tone: #a5741f; color: #8b621b; }
.st-review { --tone: #3f5b6b; color: #3f5b6b; }
.st-approve { --tone: #a33227; color: var(--red); }
.st-closed { --tone: #3d674c; color: var(--green); }
.st-returned { --tone: #6b2a22; color: #6b2a22; }

.owner-cell b { display: block; font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-cell small { display: block; margin-top: 1px; font-size: 8px; color: var(--faint); }

.due { font-family: var(--num); font-size: 9.5px; color: var(--ink-2); }
.due.over { color: var(--red); font-weight: 600; }
.due.near { color: var(--amber); }
.due-sub { display: block; margin-top: 1px; font-size: 7.5px; color: var(--faint); }
.due-sub.over { color: var(--red); }

.prog { width: 76px; height: 4px; background: var(--line-soft); position: relative; }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-2); }
.prog.over i { background: var(--red); }
.prog-sub { display: block; margin-top: 2px; font-family: var(--num); font-size: 8px; color: var(--faint); }

.row-btn { font-size: 9px; color: var(--faint); }
tr:hover .row-btn { color: var(--red); }

.empty-row { padding: 40px 10px; text-align: center; color: var(--faint); font-size: 10px; }

/* ============ 整改核验 ============ */

.view-verify { grid-template-columns: 246px minmax(0, 1fr) 330px; }

.verify-queue { overflow: hidden; }
.queue-tabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }

.qtab {
  flex: 1 1 0;
  padding: 4px 2px;
  border: 1px solid var(--line);
  font-size: 8.5px;
  color: var(--muted);
  text-align: center;
  transition: .15s ease;
}

.qtab b { font-family: var(--num); font-size: 9px; margin-left: 2px; }
.qtab:hover { border-color: var(--ink-2); }
.qtab.active { background: var(--ink); border-color: var(--ink); color: var(--paper-3); }

.queue-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 8px 8px; }

.qitem {
  position: relative;
  width: 100%;
  padding: 8px 9px 8px 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  transition: background .15s ease;
}

.qitem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: transparent;
}

.qitem:hover { background: rgba(163, 50, 39, .035); }
.qitem.active { background: rgba(163, 50, 39, .055); }
.qitem.active::before { background: var(--red); }

.qitem-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.qitem-top span { font-family: var(--num); font-size: 8px; color: var(--faint); }

.qitem b {
  display: block;
  margin: 3px 0 2px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qitem small { display: block; font-size: 8px; color: var(--faint); }
.qdots { display: flex; gap: 2px; margin-top: 4px; }
.qdots i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.qdots i.on { background: var(--green); }

.verify-main { display: grid; grid-template-rows: minmax(0, 1.04fr) minmax(0, .96fr); gap: 14px; min-height: 0; }

.compare { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); gap: 7px; min-height: 0; }

.doc {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 13px 15px 10px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #fcf7eb, #f8f1e1);
  box-shadow: var(--shadow);
}

.doc::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--red);
}

.doc-report::before { background: var(--green); }

.doc-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--num);
  font-size: 7.5px;
  letter-spacing: .12em;
  color: var(--faint);
  text-transform: uppercase;
}

.doc-tag { color: var(--red); letter-spacing: .16em; }
.doc-report .doc-tag { color: var(--green); }
.doc-no { font-family: var(--num); letter-spacing: .06em; }

.doc h2 {
  margin: 7px 0 5px;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .015em;
}

.doc p {
  margin: 0;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.78;
  text-align: justify;
  color: var(--ink-2);
}

.doc-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 7px; }
.doc-meta span { padding: 1px 4px; border: 1px solid var(--line-soft); font-size: 7.5px; color: var(--muted); }

.doc-measures {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 8.5px;
  color: var(--green);
}

.doc-sign {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--kai);
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
}

.compare-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--faint);
  font-size: 7px;
  letter-spacing: .1em;
  text-align: center;
}

.compare-mid b { font-family: var(--num); font-size: 13px; color: var(--red); letter-spacing: 0; }
.compare-mid i { font-style: normal; font-size: 13px; color: var(--line-strong); }

.evidence-card { overflow: hidden; }
.ev-sum { font-family: var(--num); font-size: 12px; color: var(--green); }
.ev-sum.miss { color: var(--red); }
.ev-body { padding: 6px 14px 8px; flex: 1 1 auto; min-height: 0; overflow: auto; }

.ev {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.ev:last-child { border-bottom: 0; }

.ev-check {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--num);
  font-size: 8px;
  color: var(--faint);
}

.ev.ok .ev-check { background: var(--green); border-color: var(--green); color: #fff; }
.ev.miss .ev-check { border-color: rgba(163, 50, 39, .5); color: var(--red); background: rgba(163, 50, 39, .06); }

.ev-name { min-width: 0; }
.ev-name b { display: block; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-name small { display: block; margin-top: 1px; font-size: 8px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-type { padding: 1px 4px; border: 1px solid var(--line); font-size: 7.5px; color: var(--muted); white-space: nowrap; }
.ev-state { font-size: 8px; color: var(--green); white-space: nowrap; }
.ev.miss .ev-state { color: var(--red); }

.ev-add {
  padding: 2px 6px;
  border: 1px solid rgba(163, 50, 39, .38);
  color: var(--red);
  font-size: 8px;
  white-space: nowrap;
  transition: .15s ease;
}
.ev-add:hover { background: var(--red); color: #fff; }

.verify-side { overflow: hidden; }
.vs-head { position: relative; flex: 0 0 auto; padding: 12px 14px 9px; border-bottom: 1px solid var(--line-soft); }

.ai-stamp {
  position: absolute;
  right: 12px;
  top: 44px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--kai);
  font-size: 9px;
  line-height: 1.35;
  color: rgba(163, 50, 39, .62);
  border: 2px solid rgba(163, 50, 39, .34);
  border-radius: 50%;
  transform: rotate(11deg);
  pointer-events: none;
  z-index: 0;
}

.ai-stamp::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(163, 50, 39, .22);
  border-radius: 50%;
}

.vs-kicker { font-size: 7.5px; letter-spacing: .16em; color: var(--faint); }
.vs-conclusion { margin-top: 3px; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .03em; }
.vs-conclusion.pass { color: var(--green); }
.vs-conclusion.need { color: var(--amber); }
.vs-conclusion.return { color: var(--red); }
.vs-sub { margin-top: 2px; font-size: 8.5px; color: var(--muted); }

.vs-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 14px 10px; }

.vs-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: 8px;
}

.vs-metrics div { padding: 5px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vs-metrics small { display: block; font-size: 7.5px; color: var(--faint); }
.vs-metrics b { font-family: var(--num); font-size: 15px; font-weight: 600; color: var(--ink); }
.vs-metrics b i { font-style: normal; font-size: 8px; color: var(--faint); margin-left: 2px; }

.vs-reason {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--line-soft);
  font-size: 9px;
  line-height: 1.55;
  color: var(--ink-2);
}

.vs-reason i {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid;
  font-family: var(--num);
  font-style: normal;
  font-size: 7px;
}

.vs-reason.pass i { color: var(--green); border-color: rgba(61, 103, 76, .45); }
.vs-reason.fail i { color: var(--red); border-color: rgba(163, 50, 39, .45); }
.vs-reason.warn i { color: var(--amber); border-color: rgba(165, 116, 31, .45); }
.vs-reason b { font-weight: 600; }
.vs-reason .rule { margin: 0 1px; }

.vs-opinion { margin-top: 8px; }
.vs-opinion label { display: block; margin-bottom: 4px; font-size: 7.5px; letter-spacing: .12em; color: var(--faint); }

.vs-opinion textarea {
  width: 100%;
  height: 62px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .45);
  font-size: 9.5px;
  line-height: 1.55;
  resize: none;
  font-family: var(--sans);
}

.vs-opinion textarea:focus { border-color: var(--ink-2); background: var(--white); }

.vs-actions { display: flex; gap: 6px; margin-top: 7px; }
.vs-actions .btn { flex: 1 1 0; padding: 6px 4px; font-size: 9.5px; }

.vs-perm { margin-top: 6px; font-size: 8px; line-height: 1.5; color: var(--faint); }

.vs-foot {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 7.5px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

/* 空态 */
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

.empty .seal-empty {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(61, 103, 76, .3);
  border-radius: 50%;
  color: var(--green);
  font-family: var(--kai);
  font-size: 19px;
  transform: rotate(-8deg);
  opacity: .75;
}

/* ============ 销号审定 ============ */

.view-approve { grid-template-columns: 246px minmax(0, 1fr) 318px; }
.appr-queue { overflow: hidden; }
.appr-sheet { overflow: hidden; }

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 2px solid var(--red);
  background: rgba(255, 253, 247, .3);
}

.sheet-head h3 { margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.sheet-head .sh-no { margin-left: auto; font-family: var(--num); font-size: 8px; color: var(--faint); letter-spacing: .08em; }

.sheet-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 18px 12px; }

.sheet-title {
  margin: 12px 0 3px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .16em;
  text-align: center;
}

.sheet-sub { text-align: center; font-size: 8px; letter-spacing: .12em; color: var(--faint); }

.chain { display: flex; align-items: stretch; margin: 12px 0 13px; }

.chain-step {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .25);
  position: relative;
}

.chain-step b { display: block; font-size: 9.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chain-step small { display: block; margin-top: 2px; font-size: 7.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain-step em { display: block; margin-top: 2px; font-style: normal; font-family: var(--num); font-size: 7.5px; color: var(--faint); }

.chain-step.done { border-color: rgba(61, 103, 76, .4); background: rgba(61, 103, 76, .055); }
.chain-step.done b { color: var(--green); }
.chain-step.now { border-color: rgba(163, 50, 39, .5); background: rgba(163, 50, 39, .055); }
.chain-step.now b { color: var(--red); }

.chain-arrow { width: 20px; flex: 0 0 20px; display: grid; place-items: center; color: var(--line-strong); font-family: var(--num); font-size: 10px; }

.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.sheet-sec { border: 1px solid var(--line); padding: 8px 10px; background: rgba(255, 253, 247, .22); min-width: 0; }
.sheet-sec.wide { grid-column: 1 / -1; }

.sheet-sec h4 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-sec h4 span { font-family: var(--num); font-size: 8px; color: var(--faint); font-weight: 400; }
.sheet-sec p { margin: 0; font-size: 9.5px; line-height: 1.65; color: var(--ink-2); text-align: justify; }
.sheet-sec .muted { color: var(--muted); }

.sheet-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); font-size: 9px; color: var(--muted); }
.sheet-kv:last-child { border-bottom: 0; }
.sheet-kv b { font-family: var(--num); font-size: 11px; font-weight: 600; color: var(--ink); }
.sheet-kv b.ok { color: var(--green); }
.sheet-kv b.no { color: var(--red); }

.sheet-mini-list { display: flex; flex-direction: column; }
.sheet-mini { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 8.5px; color: var(--ink-2); }
.sheet-mini i { width: 11px; height: 11px; display: grid; place-items: center; border: 1px solid var(--green); color: var(--green); font-family: var(--num); font-size: 6.5px; font-style: normal; flex: 0 0 auto; }
.sheet-mini.miss i { border-color: var(--red); color: var(--red); }

.sheet-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 8px;
  color: var(--faint);
}

.appr-side { overflow: hidden; }
.role-card { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.role-seal { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; background: var(--red); color: #f9efdc; font-family: var(--serif); font-size: 17px; transform: rotate(-2deg); }
.role-card b { display: block; font-size: 11px; font-weight: 600; }
.role-card small { display: block; margin-top: 2px; font-size: 8px; color: var(--faint); }

.appr-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 14px; }
.appr-hint { padding: 7px 8px; border-left: 2px solid var(--red); background: rgba(163, 50, 39, .04); font-size: 8.5px; line-height: 1.55; color: var(--muted); }

.slip-preview { margin-top: 9px; border: 1px dashed var(--line-strong); padding: 8px 9px; background: rgba(255, 253, 247, .3); }
.slip-preview small { display: block; font-size: 7.5px; letter-spacing: .12em; color: var(--faint); }
.slip-preview b { display: block; margin-top: 3px; font-family: var(--num); font-size: 13px; color: var(--red); letter-spacing: .05em; }

.appr-opinion { margin-top: 8px; }
.appr-opinion label { display: block; margin-bottom: 4px; font-size: 7.5px; letter-spacing: .12em; color: var(--faint); }
.appr-opinion textarea { width: 100%; height: 84px; padding: 7px; border: 1px solid var(--line); background: rgba(255, 253, 247, .45); font-size: 9.5px; line-height: 1.55; resize: none; }
.appr-opinion textarea:focus { border-color: var(--ink-2); background: var(--white); }

.appr-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.appr-actions .btn { width: 100%; padding: 7px 4px; }
.appr-note { margin-top: 7px; font-size: 7.5px; line-height: 1.5; color: var(--faint); }

.archive-list { display: flex; flex-direction: column; }
.archive { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); width: 100%; text-align: left; }
.archive:last-child { border-bottom: 0; }
.archive b { display: block; font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive small { display: block; margin-top: 2px; font-family: var(--num); font-size: 7.5px; color: var(--faint); }
.archive .slip { font-family: var(--num); font-size: 7.5px; color: var(--green); white-space: nowrap; }

.sheet-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 8px; color: var(--muted); font-size: 10px; text-align: center; }

/* ============ 成果运用 ============ */

.view-results { grid-template-rows: 78px minmax(0, 1.04fr) minmax(0, .96fr); }

.results-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(163, 50, 39, .06), rgba(255, 253, 247, .3) 44%, rgba(255, 253, 247, .2));
  box-shadow: var(--shadow);
  position: relative;
}

.results-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
}

.rh-main { min-width: 0; }
.rh-main h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .06em; }
.rh-main p { margin: 3px 0 0; font-size: 9px; color: var(--muted); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rh-stats { margin-left: auto; display: flex; align-items: center; gap: 0; flex: 0 0 auto; }
.rh-stat { padding: 0 17px; border-left: 1px solid var(--line); text-align: center; }
.rh-stat:first-child { border-left: 0; }
.rh-stat b { display: block; font-family: var(--num); font-size: 22px; font-weight: 600; line-height: 1; }
.rh-stat small { display: block; margin-top: 3px; font-size: 7.5px; letter-spacing: .1em; color: var(--faint); }

.clusters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-height: 0; }

.cluster {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 13px 15px 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(253, 249, 239, .95), rgba(247, 240, 226, .95));
  box-shadow: var(--shadow);
  overflow: auto;
}

.cluster::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--red); }
.cl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-id { font-family: var(--num); font-size: 9px; color: var(--red); letter-spacing: .06em; }
.cl-level { padding: 1px 5px; border: 1px solid var(--line); font-size: 7.5px; color: var(--muted); letter-spacing: .05em; }
.cluster h3 { margin: 7px 0 5px; font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .03em; }
.cluster p { margin: 0; font-size: 9.5px; line-height: 1.65; color: var(--ink-2); text-align: justify; }

.cl-meta { margin-top: 7px; font-size: 8.5px; color: var(--muted); display: flex; align-items: baseline; gap: 4px; }
.cl-meta b { font-family: var(--num); font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1; }
.cl-meta span { margin-right: 8px; }

.cl-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.cl-chip { font-family: var(--num); font-size: 7.5px; padding: 1px 4px; border: 1px solid rgba(63, 91, 107, .3); color: var(--blue); background: rgba(63, 91, 107, .03); }
.cl-chip:hover { background: rgba(63, 91, 107, .1); }

.cl-foot { margin-top: auto; padding-top: 7px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 7.5px; color: var(--faint); }

.results-low { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; min-height: 0; }

.sug-list { display: flex; flex-direction: column; }

.sug {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.sug:last-child { border-bottom: 0; }
.sug-no { font-family: var(--num); font-size: 7.5px; color: var(--faint); padding-top: 2px; }
.sug-main { min-width: 0; }
.sug-main h4 { margin: 0 0 2px; font-size: 10.5px; font-weight: 600; line-height: 1.4; }
.sug-main p { margin: 0; font-size: 8.5px; line-height: 1.5; color: var(--muted); }
.sug-main .sug-dept { margin-top: 2px; color: var(--faint); font-size: 8px; }
.sug-related { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: 4px; }
.sug-related span { font-size: 7.5px; color: var(--faint); }
.sug-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.sug-tag { padding: 1px 4px; border: 1px solid rgba(61, 103, 76, .35); color: var(--green); font-size: 7.5px; white-space: nowrap; }
.sug.adopted .sug-main h4 { color: var(--green); }
.sug.adopted { opacity: .78; }

.out-kpis { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.out-kpi { padding: 7px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.out-kpi small { display: block; font-size: 7.5px; color: var(--faint); letter-spacing: .06em; }
.out-kpi b { display: block; margin-top: 2px; font-family: var(--num); font-size: 19px; font-weight: 600; line-height: 1; }
.out-kpi b.green { color: var(--green); }
.out-kpi b.red { color: var(--red); }

.out-ledger { margin-top: 9px; }
.out-ledger h4 { margin: 0 0 4px; font-size: 8px; font-weight: 400; letter-spacing: .13em; color: var(--faint); }
.out-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--line-soft); font-size: 8.5px; }
.out-item:last-child { border-bottom: 0; }
.out-item b { font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-item small { font-family: var(--num); font-size: 7.5px; color: var(--green); white-space: nowrap; }

.out-note { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 7.5px; line-height: 1.55; color: var(--faint); }

/* ============ 抽屉 ============ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(29, 24, 17, .36);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  backdrop-filter: blur(1px);
}

.overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(650px, 94vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f8f2e4, #f1e9d8);
  border-left: 3px solid var(--red);
  box-shadow: -22px 0 60px rgba(35, 27, 14, .28);
  transform: translateX(102%);
  transition: transform .32s cubic-bezier(.2, .75, .2, 1);
}

.drawer.show { transform: none; }

.drawer-head {
  flex: 0 0 auto;
  position: relative;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, .36);
}

.drawer-close {
  position: absolute;
  right: 15px;
  top: 13px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--num);
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 253, 247, .4);
}

.drawer-close:hover { border-color: var(--red); color: var(--red); }

.dr-kicker { font-size: 8px; letter-spacing: .17em; color: var(--faint); }
.dr-title { margin: 5px 34px 8px 0; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.4; }
.dr-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.stamp {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  height: 24px;
  padding: 0 7px;
  border: 1.5px solid currentColor;
  font-family: var(--kai);
  font-size: 11px;
  letter-spacing: .15em;
  transform: rotate(-3deg);
  opacity: .88;
}

.tagchip {
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  background: rgba(255, 253, 247, .3);
}

.stamp.closed { color: var(--green); }
.stamp.review { color: var(--blue); }
.stamp.approve { color: var(--red); }
.stamp.ongoing { color: var(--amber); }
.stamp.returned { color: #6b2a22; }
.stamp.pending { color: var(--muted); }

.dr-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.dr-meta div { padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.dr-meta small { display: block; font-size: 7px; letter-spacing: .1em; color: var(--faint); }
.dr-meta b { display: block; margin-top: 2px; font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 22px 18px; }

.dr-sec { margin-top: 15px; }
.dr-sec h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 7px;
  padding-left: 8px;
  border-left: 3px solid var(--red);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
}

.dr-sec h4 span { font-family: var(--num); font-size: 7.5px; font-weight: 400; color: var(--faint); letter-spacing: .06em; }

.dr-desc { margin: 0; font-family: var(--serif); font-size: 12px; line-height: 1.85; color: var(--ink-2); text-align: justify; }

.ms-list { display: flex; flex-direction: column; }
.ms-item { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 7px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); font-size: 10px; line-height: 1.5; }
.ms-item:last-child { border-bottom: 0; }
.ms-check { width: 14px; height: 14px; margin-top: 1px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--num); font-size: 8px; color: transparent; }
.ms-item.done .ms-check { background: var(--green); border-color: var(--green); color: #fff; }
.ms-item small { font-family: var(--num); font-size: 7.5px; color: var(--faint); white-space: nowrap; }

.dr-ev { display: flex; flex-direction: column; }
.dr-ev .ev { grid-template-columns: 15px minmax(0, 1fr) auto; }

.ai-box {
  position: relative;
  padding: 9px 11px;
  border: 1px solid rgba(163, 50, 39, .24);
  background: rgba(163, 50, 39, .035);
}

.ai-box::before {
  content: "AI";
  position: absolute;
  right: 8px;
  top: 4px;
  font-family: var(--num);
  font-size: 19px;
  letter-spacing: .04em;
  color: rgba(163, 50, 39, .12);
}

.ai-line { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 7px; padding: 4px 0; border-bottom: 1px dotted rgba(163, 50, 39, .14); font-size: 9px; line-height: 1.55; }
.ai-line:last-child { border-bottom: 0; }
.ai-line b { font-size: 8px; font-weight: 600; color: var(--red); letter-spacing: .04em; }
.ai-line p { margin: 0; color: var(--ink-2); }
.ai-line .rule { margin: 0 1px; }

.tl { position: relative; padding-left: 15px; }
.tl::before { content: ""; position: absolute; left: 3px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 8px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -15px; top: 5px; width: 6px; height: 6px; border: 1px solid var(--red); border-radius: 50%; background: var(--paper-2); }
.tl-time { font-family: var(--num); font-size: 7.5px; color: var(--faint); }
.tl-main { margin-top: 1px; font-size: 9.5px; color: var(--ink-2); }
.tl-main b { font-weight: 600; }
.tl-note { margin-top: 1px; font-size: 8.5px; color: var(--muted); line-height: 1.5; }

.drawer-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 247, .42);
}

.drawer-foot .sp { flex: 1; }
.drawer-foot .perm { font-size: 7.5px; color: var(--faint); }

/* ============ 模态 ============ */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 24, 17, .48);
  backdrop-filter: blur(1.5px);
}

.modal-wrap.show { display: flex; }

.modal {
  position: relative;
  width: min(660px, 94vw);
  max-height: 86vh;
  overflow: auto;
  padding: 20px 24px 18px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--red);
  background: #f9f3e6;
  box-shadow: 0 28px 80px rgba(30, 21, 10, .38);
  animation: modalIn .24s cubic-bezier(.2, .75, .2, 1) both;
}

@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }

.modal h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .07em; }
.modal .m-sub { margin-bottom: 12px; font-size: 8px; letter-spacing: .14em; color: var(--faint); }
.modal-close { position: absolute; right: 10px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); font-family: var(--num); font-size: 12px; color: var(--muted); }
.modal-close:hover { color: var(--red); border-color: var(--red); }

.modal p { font-size: 10px; line-height: 1.7; color: var(--ink-2); margin: 0 0 9px; }
.modal .m-note { padding: 7px 9px; border-left: 2px solid var(--amber); background: rgba(165, 116, 31, .06); font-size: 9px; line-height: 1.6; color: var(--muted); margin-bottom: 10px; }

.modal label {
  display: block;
  margin: 2px 0 4px;
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--faint);
}

.modal textarea {
  width: 100%;
  height: 78px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .5);
  font-size: 10px;
  line-height: 1.6;
  resize: none;
  font-family: var(--sans);
}

.modal textarea:focus { border-color: var(--ink-2); background: var(--white); }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; }

.rule-list { display: flex; flex-direction: column; }
.rule-row { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rule-row:last-child { border-bottom: 0; }
.rule-row b { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.rule-row b i { font-family: var(--num); font-style: normal; font-size: 8px; color: var(--red); border: 1px solid rgba(163, 50, 39, .3); padding: 0 4px; }
.rule-row p { margin: 3px 0 0; font-size: 9px; line-height: 1.6; color: var(--ink-2); }
.rule-row small { display: block; margin-top: 2px; font-size: 7.5px; color: var(--faint); }

.formula-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.formula { border: 1px solid var(--line); padding: 8px 10px; background: rgba(255, 253, 247, .3); }
.formula b { display: block; font-size: 9.5px; margin-bottom: 3px; }
.formula code { display: block; font-family: var(--num); font-size: 10px; color: var(--red); line-height: 1.5; }
.formula small { display: block; margin-top: 4px; font-size: 8px; color: var(--faint); line-height: 1.45; }

.log-table { width: 100%; border-collapse: collapse; font-size: 8.5px; }
.log-table th { position: sticky; top: 0; background: #f2e9d6; padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--faint); letter-spacing: .06em; white-space: nowrap; }
.log-table td { padding: 5px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; line-height: 1.45; }
.log-table td:first-child { font-family: var(--num); color: var(--faint); white-space: nowrap; }
.log-table td:nth-child(2) { white-space: nowrap; color: var(--ink-2); font-weight: 600; }
.log-table td:nth-child(3) { color: var(--muted); white-space: nowrap; }

/* ============ 细节补充：证据账户 / 文档要素 / 签章 ============ */

.ai-basis { position: relative; z-index: 1; margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.ai-basis-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 7.5px; letter-spacing: .1em; color: var(--faint); }
.ai-basis-head b { font-family: var(--num); font-weight: 400; color: var(--muted); letter-spacing: .02em; }
.ai-stack { display: flex; height: 5px; background: var(--line-soft); }
.ai-stack i { display: block; height: 100%; }
.ai-stack .ok { background: var(--green); }
.ai-stack .miss { background: var(--amber); }
.ai-basis-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 8px; color: var(--muted); }
.ai-basis-foot b { font-family: var(--num); font-size: 9.5px; color: var(--ink); }

.mx-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 8.5px; color: var(--muted); }
.mx-sum b { font-family: var(--num); color: var(--ink); }

.doc-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 7px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.doc-facts div { min-width: 0; padding: 4px 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.doc-facts small { display: block; font-size: 7px; letter-spacing: .06em; color: var(--faint); }
.doc-facts b { display: block; margin-top: 1px; font-size: 8.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-basis { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--line); font-size: 8px; line-height: 1.55; color: var(--muted); }
.doc-basis b { flex: 0 0 auto; color: var(--red); font-weight: 600; }
.doc-basis span { flex: 1; }

.doc-mslist { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--line); }
.doc-ms { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 4px; font-size: 8px; line-height: 1.45; color: var(--muted); }
.doc-ms i { font-family: var(--num); font-style: normal; color: var(--green); }
.doc-ms span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-ms.done { color: var(--ink-2); }

.ev-impact { margin-top: 7px; padding: 6px 8px; border-left: 2px solid var(--amber); background: rgba(165, 116, 31, .055); font-size: 8.5px; line-height: 1.55; color: var(--muted); }
.ev-impact b { display: block; margin-bottom: 2px; font-size: 8px; letter-spacing: .06em; color: var(--amber); }
.ev-impact p { margin: 0; }
.ev-impact.ok { border-left-color: var(--green); background: rgba(61, 103, 76, .05); }
.ev-impact.ok b { color: var(--green); }

.vs-head { padding-right: 78px; }
.ai-stamp { top: 32px; right: 12px; width: 56px; height: 56px; font-size: 8px; }
.vs-sub { font-size: 9px; line-height: 1.55; }
.vs-reason { font-size: 9.5px; }

.vs-sec { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.vs-sec h5 { margin: 0 0 4px; font-size: 7.5px; font-weight: 400; letter-spacing: .12em; color: var(--faint); }
.vs-tl { display: flex; flex-direction: column; }
.vs-tl-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 5px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); font-size: 8px; line-height: 1.45; }
.vs-tl-item:last-child { border-bottom: 0; }
.vs-tl-item time { font-family: var(--num); font-size: 7.5px; color: var(--faint); }
.vs-tl-main { min-width: 0; }
.vs-tl-main b { font-size: 8px; font-weight: 600; color: var(--ink-2); }
.vs-tl-main span { color: var(--ink-2); }
.vs-tl-main p { margin: 0; font-size: 7.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sheet-ai { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sheet-ai div { padding: 5px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet-ai small { display: block; font-size: 7px; color: var(--faint); }
.sheet-ai b { display: block; margin-top: 2px; font-family: var(--num); font-size: 14px; font-weight: 600; }
.sheet-ai b.ok { color: var(--green); }
.sheet-ai b.no { color: var(--red); }

.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 7px; }
.sign-box { min-height: 48px; padding: 6px 8px; border: 1px solid var(--line); background: rgba(255, 253, 247, .28); }
.sign-box small { display: block; font-size: 7px; letter-spacing: .08em; color: var(--faint); }
.sign-box b { display: block; margin-top: 4px; font-size: 9px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sign-box span { display: block; margin-top: 2px; font-family: var(--num); font-size: 7px; color: var(--faint); }
.sign-box.done { border-color: rgba(61, 103, 76, .35); background: rgba(61, 103, 76, .045); }
.sign-box.done small { color: var(--green); }
.sign-box.now { border-color: rgba(163, 50, 39, .4); background: rgba(163, 50, 39, .045); }
.sign-box.now small { color: var(--red); }

.sheet-timeline { display: flex; flex-direction: column; padding-top: 5px; border-top: 1px dashed var(--line); }
.sheet-tl-item { display: grid; grid-template-columns: 56px 62px 48px minmax(0, 1fr); gap: 5px; align-items: baseline; padding: 2px 0; border-bottom: 1px dotted var(--line-soft); font-size: 7.5px; }
.sheet-tl-item time { white-space: nowrap; }
.sheet-tl-item:last-child { border-bottom: 0; }
.sheet-tl-item time { font-family: var(--num); color: var(--faint); }
.sheet-tl-item b { font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-tl-item span { color: var(--muted); white-space: nowrap; }
.sheet-tl-item p { margin: 0; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sheet-mini i { width: 14px; height: 14px; font-size: 9px; line-height: 1; font-weight: 700; }

.appr-track { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.appr-track h5, .appr-rule h5 { margin: 0 0 5px; font-size: 7.5px; font-weight: 400; letter-spacing: .12em; color: var(--faint); }
.appr-track-row { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 5px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); font-size: 8px; line-height: 1.5; color: var(--muted); }
.appr-track-row b { font-family: var(--num); font-size: 7px; color: var(--red); }
.appr-rule { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.appr-rule p { margin: 0; font-size: 7.5px; line-height: 1.55; color: var(--faint); }

.cl-statbar { display: flex; height: 4px; margin: 6px 0; background: var(--line-soft); }
.csb { display: block; height: 100%; }
.csb.closed { background: var(--green); }
.csb.review { background: var(--blue); }
.csb.approve { background: var(--red); }
.csb.ongoing { background: var(--amber); }
.csb.returned { background: #6b2a22; }
.csb.pending { background: #8b8476; }

.cl-list { display: flex; flex-direction: column; border-top: 1px dashed var(--line-soft); }
.cl-item { display: grid; grid-template-columns: 6px 29px minmax(0, 1fr) auto; gap: 5px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); text-align: left; font-size: 8px; color: var(--muted); }
.cl-item:last-child { border-bottom: 0; }
.cl-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tone); }
.cl-item b { font-family: var(--num); font-size: 7.5px; font-weight: 400; color: var(--blue); }
.cl-item-t { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-item em { font-style: normal; font-size: 7px; color: var(--faint); }
.cl-item:hover .cl-item-t { color: var(--red); }
.cl-key { margin-left: auto; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 7px; color: var(--faint); }

.out-actions { margin-top: 9px; padding-top: 7px; border-top: 1px dashed var(--line); }
.out-actions h4 { margin: 0 0 4px; font-size: 8px; font-weight: 400; letter-spacing: .13em; color: var(--faint); }
.out-act { display: grid; grid-template-columns: 19px minmax(0, 1fr); gap: 5px; padding: 3px 0; border-bottom: 1px dotted var(--line-soft); font-size: 8px; line-height: 1.5; color: var(--muted); }
.out-act b { font-family: var(--num); font-size: 7px; color: var(--red); }
.out-act em { font-style: normal; font-family: var(--num); color: var(--ink); }

.rule-row.active { background: rgba(163, 50, 39, .045); box-shadow: inset 3px 0 var(--red); padding-left: 7px; }

.ai-copy p { font-size: 10.5px; }
.cluster p { font-size: 10px; line-height: 1.7; }

.lg-row { display: inline-flex; align-items: center; gap: 4px; }
.dotc { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--tone); }

.doc-links { display: flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 8px; color: var(--faint); }
.doc-links b { margin-right: 2px; font-weight: 400; color: var(--faint); }

.ev-proof { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 7px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.ev-proof div { padding: 4px 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.ev-proof small { display: block; font-size: 7px; color: var(--faint); }
.ev-proof b { display: block; margin-top: 1px; font-family: var(--num); font-size: 11px; font-weight: 600; }
.ev-proof b.no { color: var(--red); }
.ev-proof b.ok { color: var(--green); }

.cl-reason { margin-top: 6px; padding: 5px 7px; border: 1px solid var(--line-soft); background: rgba(255, 253, 247, .3); font-size: 7.5px; line-height: 1.5; }
.cl-reason div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 5px; padding: 2px 0; border-bottom: 1px dotted var(--line-soft); }
.cl-reason div:last-child { border-bottom: 0; }
.cl-reason b { font-size: 7px; font-weight: 600; color: var(--red); }
.cl-reason span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-sug { display: inline-block; margin-right: 2px; padding: 0 3px; border: 1px solid rgba(61, 103, 76, .3); color: var(--green); font-family: var(--num); }

.cl-confidence { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 7.5px; color: var(--faint); }
.cl-cbar { flex: 1; height: 4px; background: var(--line-soft); position: relative; }
.cl-cbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); }
.cl-confidence b { font-family: var(--num); font-size: 9px; color: var(--red); }
.cl-next { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; padding-top: 4px; border-top: 1px dotted var(--line-soft); }
.cl-next div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 5px; font-size: 7.5px; line-height: 1.5; color: var(--muted); }
.cl-next b { font-size: 7px; font-weight: 600; color: var(--ink-2); }
.cl-next span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dr-ready { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dr-ready div { display: grid; grid-template-columns: 1fr auto 15px; gap: 6px; align-items: center; padding: 4px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dr-ready span { font-size: 8px; color: var(--faint); }
.dr-ready b { font-family: var(--num); font-size: 10px; font-weight: 600; }
.dr-ready i { width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid; font-family: var(--num); font-style: normal; font-size: 8px; }
.dr-ready i.ok { color: var(--green); border-color: rgba(61, 103, 76, .4); }
.dr-ready i.no { color: var(--red); border-color: rgba(163, 50, 39, .4); }
.dr-ready i.wait { color: var(--amber); border-color: rgba(165, 116, 31, .4); }
.dr-ready-note { margin: 5px 0 0; font-size: 8px; line-height: 1.55; color: var(--muted); }
.dr-ready-note b { color: var(--red); }

/* 案例卡封面模式：1600×900 只保留首屏两大主卡，避免裁切内容 */
html.thumb .app { min-height: 0; }
html.thumb .view-overview { grid-template-rows: 116px minmax(0, 1.16fr) minmax(0, .84fr); }
html.thumb .stage { padding-bottom: 10px; }
html.thumb .foot { display: none; }
html.thumb .ai-card .card-b::after {
  content: "整改闭环 · 销号有据";
  position: absolute;
  right: 22px;
  bottom: 44px;
  font-family: var(--kai);
  font-size: 38px;
  letter-spacing: .12em;
  line-height: 1.5;
  color: rgba(163, 50, 39, .055);
  writing-mode: vertical-rl;
  pointer-events: none;
}

/* ============ 提示 ============ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 80vw;
  padding: 9px 16px;
  background: var(--ink);
  border-left: 3px solid var(--red);
  color: #f8efdd;
  font-size: 10.5px;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(20, 14, 7, .3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-left-color: var(--green); }
.toast.err { background: #6f241c; border-left-color: #f0cf9d; }
.toast i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }
.toast.ok i { background: #9fd0b2; }
.toast.err i { background: #f0cf9d; }

/* ============ 页脚 ============ */

.foot {
  position: relative;
  z-index: 2;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 26px;
  border-top: 1px solid rgba(33, 30, 24, .16);
  background: rgba(255, 252, 244, .2);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: var(--faint);
}

.foot-mid { color: var(--muted); }
.foot b { font-family: var(--num); font-weight: 400; color: var(--muted); }

/* ============ 响应式与动效 ============ */

:focus-visible { outline: 2px solid rgba(163, 50, 39, .45); outline-offset: 2px; }

.static *, .static *::before, .static *::after {
  animation-duration: .001s !important;
  transition-duration: .001s !important;
}

.static .view { animation: none !important; }

@media (max-width: 1500px) {
  .mast { gap: 16px; padding: 0 20px; }
  .brand { padding-right: 14px; }
  .brand-name { font-size: 25px; }
  .brand-sub { font-size: 9px; }
  .tab { padding: 0 11px; }
  .tab b { font-size: 14px; }
  .stage { padding: 12px 16px 10px; }
  .kpi-v { font-size: 35px; }
  .view-overview { grid-template-rows: 122px minmax(0, 1.18fr) minmax(0, .92fr); }
  .unit-row { grid-template-columns: 132px minmax(0, 1fr) 68px; gap: 10px; }
  .dr-meta { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1280px) {
  .app { min-height: 100vh; height: auto; }
  .mast { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .tabs { order: 3; width: 100%; height: 54px; }
  .tab { height: 54px; flex: 1; justify-content: center; }
  .tab i { margin-top: 0; align-self: center; }
  .mast-right { margin-left: auto; }
  .stage { overflow: visible; }
  .view { height: auto; }
  .view-overview, .view-results { grid-template-rows: none; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .ov-mid, .ov-low, .results-low, .clusters { grid-template-columns: 1fr; }
  .view-ledger, .view-verify, .view-approve { grid-template-columns: 1fr; }
  .ledger-side, .verify-queue, .appr-queue { max-height: 300px; }
  .compare { grid-template-columns: 1fr; }
  .compare-mid { flex-direction: row; padding: 4px 0; }
  .verify-main { grid-template-rows: none; }
  .foot { flex-wrap: wrap; height: auto; padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
