:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --ink: #161a1f;
  --ink-2: #58616d;
  --ink-3: #8d95a0;
  --accent: #2f6bed;
  --accent-weak: #eaf1fe;
  --pass: #0f8a5f;
  --pass-weak: #e7f6ef;
  --reject: #cf4540;
  --reject-weak: #fdeceb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

/* hidden 属性必须能压过下面各处的 display:grid/flex */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }

/* ---------------- 顶栏 ---------------- */

.top {
  height: 58px;
  flex: 0 0 auto;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, #3d7bf5, #2352c6);
  color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(47, 107, 237, 0.28);
}

.brand-text h1 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.brand-text p { margin: 0; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

/* 视图切换：审核台 / 汇总表 */
.viewtabs { display: flex; gap: 2px; padding: 3px; background: #f2f4f7; border-radius: 10px; flex: 0 0 auto; }
.vtab {
  border: 0;
  background: transparent;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.15s;
}
.vtab:hover { color: var(--ink); }
.vtab.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

.stats { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.stat {
  min-width: 72px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
  text-align: center;
}
.stat b { display: block; font-size: 16px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--ink-3); }
.stat.ok b { color: var(--pass); }
.stat.no b { color: var(--reject); }

/* ---------------- 筛选条 ---------------- */

.filterbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.fl { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 0 auto; }
.fl > span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.fl em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.fl.grow { flex: 1 1 180px; min-width: 140px; }
.fl.grow input { width: 100%; }

.filterbar select,
.filterbar input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  outline: none;
  color: var(--ink);
  min-width: 0;
}
.filterbar select { max-width: 190px; }
.filterbar input[type="date"] { width: 132px; flex: 0 0 auto; }
.filterbar select:focus,
.filterbar input:focus { border-color: #b9cdf7; box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.1); }
.filterbar select:disabled { opacity: 0.45; cursor: not-allowed; background: #f6f7f9; }

.quick { display: flex; gap: 2px; padding: 2px; background: #f2f4f7; border-radius: 8px; }
.qbtn {
  border: 0; background: transparent;
  padding: 4px 9px; border-radius: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.qbtn:hover { color: var(--ink); }
.qbtn.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

.primary.sm { height: 30px; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }
.filterbar .ghost { height: 30px; padding: 0 12px; font-size: 12.5px; }

.range-note { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.ghost {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.15s;
}
.ghost:hover { border-color: #cfd6df; color: var(--ink); background: #fafbfc; }
.ghost:active { transform: translateY(1px); }
.ghost:disabled { opacity: 0.45; cursor: not-allowed; }

.primary {
  height: 36px; padding: 0 18px;
  border: 0; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-weight: 600; cursor: pointer;
}
.primary:hover { background: #2560dd; }

/* 当前登录人 */
.who { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.who-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, #4a86f7, #2f6bed);
  color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  flex: 0 0 auto;
}
.who-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.who-text b { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.who-text em {
  font-style: normal; font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.who-text em.admin { color: var(--accent); }
.ghost.xs { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }

/* 门店权限异常提示 */
.scope-warn {
  flex: 0 0 auto;
  padding: 7px 16px;
  background: #fdf3e7;
  border-bottom: 1px solid #f2ddc3;
  color: #92540c;
  font-size: 12.5px;
  line-height: 1.55;
}
.scope-warn b { font-weight: 600; }

/* ---------------- 登录 ---------------- */

.gate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 20px;
  background: radial-gradient(120% 90% at 50% 0%, #eaf1fe 0%, #f5f6f8 58%, #eceff3 100%);
}

.gate-card {
  width: 100%; max-width: 362px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 22px;
  box-shadow: var(--shadow);
}

.gate-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(140deg, #3d7bf5, #2352c6);
  color: #fff; display: grid; place-items: center;
  font-size: 18px; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 14px;
  box-shadow: 0 5px 12px rgba(47, 107, 237, 0.3);
}

.gate-card h2 { margin: 0; font-size: 18px; letter-spacing: 0.2px; }
.gate-sub { margin: 7px 0 18px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

.gate-field { display: block; margin-bottom: 12px; }
.gate-field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.gate-field input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; outline: none; background: #fff;
}
.gate-field input:focus { border-color: #b9cdf7; box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.1); }

.gate-btn { width: 100%; height: 40px; margin-top: 4px; letter-spacing: 2px; }
.gate-btn:disabled { opacity: 0.6; cursor: default; }

.gate-err {
  margin: 0 0 10px;
  padding: 8px 11px;
  background: var(--reject-weak);
  color: var(--reject);
  border-radius: 8px;
  font-size: 12.5px;
}

.gate-note { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

/* ---------------- 布局 ---------------- */

.layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 14px;
  padding: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compare { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }

.compare-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
}

.tabs { display: flex; gap: 4px; padding: 3px; background: #f2f4f7; border-radius: 10px; }

.tab {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

.chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.chk input { accent-color: var(--accent); }

.tip { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 舞台 ---------------- */

.stage { position: relative; flex: 1 1 auto; min-height: 0; padding: 12px; }

.panels { height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fbfbfc;
}

.shot figcaption {
  flex: 0 0 auto;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
}

.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.tag.before { background: #eef1f5; color: #4b5665; }
.tag.after { background: var(--accent-weak); color: #2352c6; }

/* 来源角标：护理前照片取自销售单「三联单」时标一下，避免跟明细照片混淆 */
.src-tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px dashed #c8d0da;
  color: var(--ink-3);
  white-space: nowrap;
}

.shot-time { font-size: 12px; color: var(--ink-3); }

.open { margin-left: 8px; font-size: 12px; color: var(--ink-3); text-decoration: none; }
.open:hover { color: var(--accent); }

.viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #eef0f3;
  cursor: grab;
  touch-action: none;
}
.viewport.grabbing { cursor: grabbing; }

.canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform-origin: center center;
}

.canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.miss {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #f4f5f7, #f4f5f7 10px, #eef0f3 10px, #eef0f3 20px);
  color: var(--ink-3);
  font-size: 13px;
}
.miss span { background: #fff; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); }

.thumbs {
  margin-left: auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  flex-wrap: nowrap;
  max-width: 52%;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.thumbs::-webkit-scrollbar { height: 4px; }
.thumbs::-webkit-scrollbar-thumb { background: #ccd3dd; border-radius: 4px; }
.thumbs img {
  width: 24px; height: 24px;
  object-fit: cover;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #eef0f3;
  flex: 0 0 auto;
}
.thumbs img:hover { border-color: #c3ccd8; }
.thumbs img.is-on { border-color: var(--accent); }

/* ---------------- 叠加滑动 ---------------- */

.slider {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef0f3;
  cursor: ew-resize;
}
.sl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.sl-over { position: absolute; inset: 0; }
.sl-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 0;
  border-left: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.sl-handle i {
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.sl-handle i::before, .sl-handle i::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 0; height: 0;
  border: 6px solid transparent;
}
.sl-handle i::before { left: 2px; border-right-color: #7c8595; }
.sl-handle i::after { right: 2px; border-left-color: #7c8595; }

.sl-tag {
  position: absolute;
  top: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: #3c4553;
  pointer-events: none;
}
.sl-tag.left { left: 14px; }
.sl-tag.right { right: 14px; }

/* ---------------- 闪切 ---------------- */

.flip {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef0f3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flip img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.flip-tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.94);
  color: #3c4553;
}
.flip-btn {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(23, 28, 35, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  font-size: 12.5px;
}
.flip-btn:hover { background: rgba(23, 28, 35, 0.86); }

/* ---------------- 空状态 ---------------- */

.empty-state {
  position: absolute;
  inset: 12px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty-state b { font-size: 16px; }
.empty-state p { margin: 0 0 8px; color: var(--ink-3); font-size: 13px; }

/* ---------------- 底部导航 ---------------- */

.compare-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-2);
}
.nav { display: flex; align-items: center; gap: 10px; }
.progress { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.dots { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
.dot {
  width: 18px; height: 6px;
  border-radius: 3px;
  background: #dfe3e9;
  cursor: pointer;
  transition: 0.15s;
}
.dot.is-done { background: #a9d8c4; }
.dot.is-cur { background: var(--accent); }
.dot.is-rej { background: #f0b3b0; }

/* ---------------- 右侧面板 ---------------- */

.side { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }

.side h2 {
  margin: 0;
  padding: 12px 16px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--line-2);
}

.info dl { margin: 0; padding: 10px 16px 14px; display: grid; grid-template-columns: 74px 1fr; gap: 8px 10px; }
.info dt { color: var(--ink-3); font-size: 12.5px; }
.info dd { margin: 0; font-size: 13px; word-break: break-all; }
.info dd.mono { font-variant-numeric: tabular-nums; }
/* 一单多个项目时长文本只占三行，可滚动看全 */
.info dd.long { max-height: 3.6em; overflow-y: auto; }

.review { display: flex; flex-direction: column; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 10px; }

.btn {
  border-radius: 11px;
  padding: 10px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  transition: 0.15s;
  text-align: left;
}
.btn b { font-size: 15px; }
.btn small { font-size: 11px; opacity: 0.8; }
.btn.pass { background: var(--pass-weak); border-color: #bfe3d4; color: #0b6c4b; }
.btn.pass:hover { background: #d9f0e6; border-color: #9fd6c0; }
.btn.reject { background: var(--reject-weak); border-color: #f2c8c5; color: #a5352f; }
.btn.reject:hover { background: #fbe0de; border-color: #e9aaa6; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
/* 驳回原因没写时的「锁定」观感：不是灰掉，而是明示「要填原因」 */
.btn.reject.is-locked { opacity: 0.55; cursor: not-allowed; border-style: dashed; }
.btn.reject.is-locked small { color: #a5352f; opacity: 0.95; }

.remark-tip {
  margin: 6px 16px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.remark-tip.warn { color: #b4670f; }
.remark-tip.ok { color: #0b6c4b; }
.remark-tip b { font-weight: 600; }

.review textarea.need {
  border-color: #e9aaa6;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(196, 66, 58, 0.08);
}
.review textarea.shake { animation: shake 0.32s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 16px 10px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { border-color: #c9d1db; background: #fafbfc; color: var(--ink); }

.review textarea {
  margin: 0 16px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  min-height: 62px;
  outline: none;
  font-size: 13px;
  background: #fff;
}
.review textarea:focus { border-color: #b9cdf7; box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.1); }

.field { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; }
.field span { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.field input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  font-size: 13px;
  min-width: 0;
}
.field input:focus { border-color: #b9cdf7; box-shadow: 0 0 0 3px rgba(47, 107, 237, 0.1); }

.foot-note { margin: 10px 16px 14px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.foot-note.warn { color: #b4670f; }

.notify-hint {
  margin: 10px 16px 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--accent-weak);
  color: #2352c6;
  font-size: 11.5px;
  line-height: 1.55;
}
.notify-hint.warn { background: #fdf3e4; color: #9a5b09; }

.retry {
  margin: 8px 16px 0;
  padding: 8px 12px;
  border: 1px solid #f0c9a8;
  border-radius: 9px;
  background: #fdf3e4;
  color: #9a5b09;
  font-size: 12.5px;
  cursor: pointer;
}
.retry:hover { background: #fbe9d2; }

/* ---------------- 汇总表 ---------------- */

.summary-view { flex: 1 1 auto; min-height: 0; padding: 12px; display: flex; }

.summary { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.summary-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
}
.summary-hint { font-size: 12px; color: var(--ink-3); }
.sum-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sum-actions .ghost { height: 30px; padding: 0 12px; font-size: 12.5px; }
.export { text-decoration: none; display: inline-flex; align-items: center; }

/* 管理员：审核员 → 门店 */
.assign-panel {
  flex: 0 0 auto;
  max-height: 190px;
  overflow: auto;
  padding: 12px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line-2);
}
.assign-note { font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; line-height: 1.6; }
.assign-row { display: flex; gap: 12px; align-items: flex-start; padding: 5px 0; font-size: 12.5px; }
.assign-who { flex: 0 0 140px; font-weight: 600; line-height: 1.4; }
.assign-who em { display: block; font-style: normal; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.assign-stores { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 auto; }
.assign-stores span {
  padding: 2px 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 11.5px; color: var(--ink-2);
}
.assign-stores .none { color: #92540c; border-color: #f2ddc3; background: #fdf6ec; }

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

.sum-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sum-table th, .sum-table td { padding: 8px 12px; text-align: right; white-space: nowrap; }
.sum-table th:first-child, .sum-table td:first-child { text-align: left; }

.sum-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fb;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}
.sum-table thead th:hover { color: var(--ink); }
.sum-table thead th.sorted { color: var(--accent); }
.sum-table thead th.sorted::after { content: " ▾"; font-size: 10px; }
.sum-table thead th.sorted.asc::after { content: " ▴"; }

.sum-table tbody tr { cursor: pointer; }
.sum-table tbody tr:nth-child(even) { background: #fcfdfe; }
.sum-table tbody tr:hover { background: var(--accent-weak); }
.sum-table tbody td { border-bottom: 1px solid var(--line-2); }

.sum-table td.num { font-variant-numeric: tabular-nums; }
.sum-table td.name { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.sum-table td.pending-n { color: #b4670f; font-weight: 700; }
.sum-table td.zero { color: #c3c8d0; }
.sum-table .muted { color: var(--ink-3); font-size: 12px; }

.bar {
  display: inline-block;
  width: 76px; height: 6px;
  border-radius: 3px;
  background: #eef0f3;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 8px;
}
.bar i { display: block; height: 100%; background: var(--pass); }
.bar.low i { background: #d98a2b; }

.sum-table tfoot td {
  position: sticky;
  bottom: 0;
  background: #f7f9fb;
  font-weight: 700;
  border-top: 1px solid var(--line);
}

/* ---------------- 提示 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(23, 28, 35, 0.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 50;
  max-width: 70vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.pass { background: #0f8a5f; }
.toast.reject { background: #cf4540; }
.toast.warn { background: #b4670f; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; overflow: auto; }
  .side { overflow: visible; }
  .tip { display: none; }
}
