/* ============================================================
   巡电考勤 · 管理后台样式
   纯手写，无框架。配色沿用小程序：主蓝 #1668DC / 青 #00B39A
   ============================================================ */

:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --text: #1b2432;
  --muted: #6b7787;
  --brand: #1668dc;
  --brand-dark: #0f52b3;
  --brand-soft: #e8f0fe;
  --ok: #00b39a;
  --warn: #f5a524;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 36, 50, .04), 0 4px 16px rgba(27, 36, 50, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: #f0f2f6; padding: 1px 5px; border-radius: 4px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; }

/* ------------------------------------------------------------ 通用控件 */

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  transition: background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: #cdd5e2; color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f7c9cb; }
.btn-danger:hover { background: #fbdcdc; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }

.icon-btn {
  appearance: none; background: none; border: none;
  font-size: 22px; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 0 4px;
}
.icon-btn:hover { color: var(--text); }

input, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  max-width: 100%;
}
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 220, .12);
}
input[type=date], input[type=month] { min-width: 148px; }
.num { width: 76px; }
.search { min-width: 240px; }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field > input, .field > select { width: 100%; }

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check input { width: 15px; height: 15px; accent-color: var(--brand); }

/* 分段切换（报表维度：按日期 / 按人员） */
.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--line-2);
  border-radius: 9px;
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: var(--card);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(27, 36, 50, .08);
}

/* 按人员报表的日期矩阵 */
.mx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1;
}
.mx-ok { background: #e6f7f4; color: #0a8a76; }
.mx-miss { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.mx-doing { background: #fff5e5; color: #b8730a; }
.mx-rest { background: transparent; color: #c3cad6; }
.mx-none { background: transparent; color: #c3cad6; }

/* 矩阵表头：日期列窄一点，能一屏看更多天 */
th.mx-h {
  width: 26px;
  min-width: 26px;
  text-align: center;
  padding: 10px 2px;
  font-size: 11px;
  color: #97a3b6;
}
.mx-table tbody td:nth-child(n+11) {
  padding: 8px 4px;
  text-align: center;
}

/* 冻结工号 / 姓名两列，横向滚到 20 号也知道这是谁 */
.mx-s1, .mx-s2 {
  position: sticky;
  background: var(--card);
  z-index: 2;
}
thead .mx-s1, thead .mx-s2 { background: #fafbfd; z-index: 3; }
/* 宽度必须写死：sticky 的 left 偏移是按列宽算的，让内容撑开就会两列叠在一起 */
.mx-s1, .mx-s2 { padding: 11px 8px; overflow: hidden; white-space: nowrap; }
.mx-s1 { left: 0; width: 72px; min-width: 72px; max-width: 72px; }
.mx-s2 { left: 72px; width: 84px; min-width: 84px; max-width: 84px; box-shadow: 1px 0 0 var(--line-2); }
tbody tr:hover .mx-s1, tbody tr:hover .mx-s2 { background: #fafbfd; }

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

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(22, 104, 220, .10), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(0, 179, 154, .10), transparent 45%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 18px;
  padding: 34px 30px 26px;
  box-shadow: 0 10px 40px rgba(27, 36, 50, .10);
  text-align: center;
}
.login-logo {
  width: 54px; height: 54px;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: linear-gradient(135deg, #1668dc, #00b39a);
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card h1 { font-size: 21px; letter-spacing: .5px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 26px; }
.login-card .field { text-align: left; }
.login-err {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin: -6px 0 8px;
  text-align: left;
}
.login-tip {
  margin-top: 18px;
  font-size: 11.5px;
  color: #9aa5b4;
  line-height: 1.6;
}

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

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* 限定在侧栏内：.brand 这个类名在统计卡上也会用（.stat.accent 前叫 .brand），
   不加作用域会让手机端 .brand{display:none} 连统计卡一起隐藏掉 */
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 22px; }
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1668dc, #00b39a);
  color: #fff;
  font-weight: 600;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 36px;
}
.brand-name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #4a5666;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-item i {
  font-style: normal;
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: #9aa5b4;
}
.nav-item:hover { background: #f6f8fc; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.active i { color: var(--brand); }

.sidebar-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.sync-state { font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.sync-state.bad { color: var(--danger); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px;
  flex: 0 0 62px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content { padding: 22px 26px 60px; }

/* ------------------------------------------------------------ 卡片 / 工具栏 */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line-2);
}
.card-body { padding: 16px 18px 18px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-body .toolbar { margin-bottom: 14px; }

/* ------------------------------------------------------------ 统计卡 */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-val { font-size: 25px; font-weight: 650; letter-spacing: -.5px; line-height: 1.1; }
.stat-val small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.stat.ok .stat-val { color: var(--ok); }
.stat.warn .stat-val { color: var(--warn); }
.stat.bad .stat-val { color: var(--danger); }
.stat.accent .stat-val { color: var(--brand); }

/* ------------------------------------------------------------ 区域卡 */

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.area-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--brand);
}
.area-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.area-card-name { font-size: 14px; font-weight: 600; }
.area-card-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.area-card-rate { font-size: 20px; font-weight: 650; }
.bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; background: var(--brand); transition: width .35s; }
.area-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 8px;
}

/* ------------------------------------------------------------ 表格 */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  background: #fafbfd;
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfd; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.name { font-weight: 550; }

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ 标签 / 徽标 */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.tag-ok { background: #e6f8f4; color: #00806e; }
.tag-part { background: #fff6e6; color: #a86a00; }
.tag-none { background: var(--danger-soft); color: #b8383c; }
.tag-rest { background: #f1f3f7; color: #6b7787; }
.tag-doing { background: var(--brand-soft); color: var(--brand); }
.tag-owner { background: #f2eafd; color: #6b32c9; }
.tag-admin { background: var(--brand-soft); color: var(--brand); }
.tag-inspector { background: #f1f3f7; color: #5c6878; }
.tag-pub { background: #e6f8f4; color: #00806e; }

.progress-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.progress-mini .bar { flex: 1; min-width: 54px; }
.progress-mini span { font-size: 12px; color: var(--muted); white-space: nowrap; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

.actions { display: flex; gap: 8px; white-space: nowrap; }
.link-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn:disabled { color: #c2cad6; cursor: not-allowed; text-decoration: none; }

/* ------------------------------------------------------------ 调班列表 */

.ov-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ov-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #fafbfd;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  font-size: 13px;
}
.ov-item .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ 弹窗 */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 40, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(20, 28, 40, .22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
}
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
  background: #fafbfd;
}

.form-row { display: flex; gap: 12px; }
.form-row > .field { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(27, 36, 50, .93);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 200;
  max-width: 80vw;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.err { background: rgba(196, 43, 48, .95); }

/* ------------------------------------------------------------ 响应式 */

@media (max-width: 860px) {
  .layout { flex-direction: column; }

  /* 手机上侧栏变成顶部两行：一行状态+退出，下面 3×2 的功能网格。
     六个入口全部可见可点，不用横向滑动去找。 */
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px 10px;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .sidebar .brand { display: none; }

  .sidebar-foot {
    order: -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    border: none;
    padding: 0 0 7px;
    gap: 8px;
  }
  .sync-state { display: block; margin-right: auto; padding: 0; font-size: 11px; }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 4px;
    flex: none;
    width: 100%;
  }
  .nav-item {
    justify-content: center;
    padding: 8px 4px;
    font-size: 12.5px;
    border-radius: 8px;
  }
  .nav-item i { display: none; }
  .nav-item span { white-space: nowrap; }

  .topbar { height: 52px; flex-basis: 52px; padding: 0 14px; }
  .topbar h2 { font-size: 16px; }
  .topbar-actions { gap: 8px; }
  #lastSync { display: none; }
  .content { padding: 14px 14px 50px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .area-grid { grid-template-columns: 1fr; gap: 10px; }
  .search { min-width: 0; flex: 1; }
  .form-row { flex-direction: column; gap: 0; }
  .toolbar { gap: 8px; }
  table { font-size: 13px; }
  thead th, tbody td { padding: 9px 11px; }
}

/* ------------------------------------------------------------ 点位码标签 */

.qr-help p { margin: 0 0 6px; }
.qr-help p:last-child { margin-bottom: 0; }

/* 只在窄屏出现的提示 */
.only-mobile { display: none; }
@media screen and (max-width: 860px) {
  .only-mobile { display: block; }
}

/* 屏幕上按真实毫米排版，所见即所得：量出来多大，打出来就多大 */
.qr-sheet {
  display: grid;
  grid-template-columns: repeat(2, 90mm);
  justify-content: center;
  gap: 0;
  padding: 6mm 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.qr-label {
  width: 90mm;
  height: 52mm;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4mm;
  padding: 4mm;
  background: #fff;
  /* 屏幕上是虚线裁剪线；打印时会换成浅色实线 */
  border: 1px dashed #cdd6e3;
  break-inside: avoid;
  page-break-inside: avoid;
}

.qr-img {
  flex: 0 0 42mm;
  width: 42mm;
  height: 42mm;
}
.qr-img svg { display: block; width: 100%; height: 100%; }

.qr-bad {
  width: 42mm; height: 42mm;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 9pt;
  text-align: center;
  line-height: 1.3;
}

.qr-meta {
  flex: 1;
  min-width: 0;
  /* 四行文字整体垂直居中，和左边二维码的视觉重心对齐 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #111;
}

.qr-name {
  font-size: 12.5pt;
  font-weight: 700;
  line-height: 1.2;
  /* 点位名可能很长，最多两行，超出省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.qr-area { font-size: 8.5pt; color: #4a5568; margin-top: 2mm; }
.qr-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10pt;
  font-weight: 700;
  margin-top: 2mm;
  letter-spacing: .02em;
  word-break: break-all;
}
.qr-tip {
  font-size: 7.5pt;
  color: #94a3b8;
  margin-top: 3.5mm;
}

.qr-empty {
  grid-column: 1 / -1;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* 手机预览：标签是固定 90mm 的物理尺寸，窄屏放不下会横向溢出。
   这里改成紧凑卡片，只为"看得清内容"，打印仍走下面的 mm 排版。
   必须加 screen 限定：A4 纸在 96dpi 下约 794px 宽，不加会误触发这套规则把打印排版搞乱。 */
@media screen and (max-width: 860px) {
  .qr-sheet {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    overflow: visible;
  }
  .qr-label {
    width: 100%;
    height: auto;
    gap: 10px;
    padding: 10px;
  }
  .qr-img { flex: 0 0 88px; width: 88px; height: 88px; }
  .qr-bad { width: 88px; height: 88px; font-size: 11px; }
  .qr-name { font-size: 15px; -webkit-line-clamp: 2; }
  .qr-area { font-size: 12px; margin-top: 4px; }
  .qr-code { font-size: 13px; margin-top: 4px; }
  .qr-tip { font-size: 11px; margin-top: 6px; }
}

/* ------------------------------------------------------------ 成员审核 */

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff6e6;
  border: 1px solid #f3e0bd;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.6;
}

.notice.bad {
  background: var(--danger-soft);
  border-color: #f7cfd0;
  color: #b8383c;
}

.modal-body p.muted {
  margin: 0 0 14px;
}

.wx-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.wx-field {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.wx-field input { width: 100%; }

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(20, 32, 51, .04);
}

.review-card.is-pending {
  border-left: 3px solid var(--warn);
}

.review-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1668dc, #00b39a);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.review-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.review-meta {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}

.review-match {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 12.5px;
  color: #4a5666;
}

.review-match.ok { background: #e6f8f4; color: #00705f; }
.review-match.warn { background: #fff6e6; color: #8a5a00; }

.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.review-actions .btn { flex: 0 0 auto; }
.review-actions .grow { flex: 1 1 auto; }

.review-reason {
  margin-top: 10px;
  font-size: 12.5px;
  color: #b8383c;
}

/* ------------------------------------------------------------ 打印 */

@media print {
  @page { size: A4 portrait; margin: 8mm; }

  html, body { background: #fff !important; }

  .sidebar, .topbar, .toolbar, .modal-mask, .toast, .no-print,
  #loginView, .sidebar-foot { display: none !important; }

  .layout { display: block !important; min-height: 0 !important; }
  .main { display: block !important; }
  .content { padding: 0 !important; margin: 0 !important; }

  /* 只打印当前这一页，其它页即使 DOM 里在也不出纸 */
  .page { display: none !important; }
  .page:not(.hidden) { display: block !important; }

  .card { box-shadow: none; border: 1px solid #ddd; }

  /* A4 一页 2 列 × 5 行 = 10 张；标签之间不留空隙，靠裁剪线切开 */
  .qr-sheet {
    display: grid;
    grid-template-columns: repeat(2, 90mm);
    justify-content: center;
    gap: 0;
    padding: 0;
    background: #fff;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .qr-label {
    border: 1px solid #e3e8ef;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  /* 二维码和文字必须是纯黑白，别被主题色干扰扫描 */
  .qr-name, .qr-code { color: #000 !important; }
}
