:root {
  --el-color-primary: #409eff;
  --el-color-primary-dark: #337ecc;
  --el-color-success: #67c23a;
  --el-color-warning: #e6a23c;
  --el-color-danger: #f56c6c;
  --el-text: #303133;
  --el-text-regular: #606266;
  --el-text-secondary: #909399;
  --el-border: #dcdfe6;
  --el-fill: #f5f7fa;
  --el-page: #f0f2f5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--el-page);
  color: var(--el-text);
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}
a { color: var(--el-color-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e4e7ed;
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-actions form { margin: 0; }
.error { margin: 0 0 12px; color: var(--el-color-danger); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.auth-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--el-color-primary);
}
.auth-body { padding: 36px 32px 32px; }
.auth-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 8px;
  background: #ecf5ff;
  color: var(--el-color-primary);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-body h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
}
.auth-body .lead {
  margin: 6px 0 22px;
  text-align: center;
  color: var(--el-text-secondary);
}
.auth .control { height: 40px; }
.auth-submit { width: 100%; height: 40px; margin-top: 4px; }

.qr-layout { display: grid; grid-template-columns: 280px 1fr; }
.qr-side {
  padding: 28px 24px;
  background: #f7f9fc;
  border-right: 1px solid #ebeef5;
  text-align: center;
}
.qr-frame {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
}
.qr-frame img { display: block; width: 200px; height: 200px; }
.qr-no { margin: 16px 0 4px; font-size: 16px; font-weight: 600; word-break: break-all; }
.qr-main { padding: 28px 28px 24px; }
.qr-main h2 { margin: 12px 0 8px; font-size: 18px; }
.qr-main p { margin: 0 0 18px; line-height: 1.7; color: var(--el-text-regular); }
.qr-actions { display: flex; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) {
  .qr-layout { grid-template-columns: 1fr; }
  .qr-side { border-right: 0; border-bottom: 1px solid #ebeef5; }
  .qr-actions { flex-direction: column; }
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  color: var(--el-text);
}
.brand strong {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand span { color: var(--el-text-secondary); white-space: nowrap; }

.shell { display: flex; min-height: 100vh; }
.side {
  width: 210px;
  flex: none;
  background: #304156;
  display: flex;
  flex-direction: column;
}
.side-brand {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: #2b2f3a;
  white-space: nowrap;
}
.side-nav { display: flex; flex-direction: column; }
.side a { color: #bfcbd9; }
.side-nav .item,
.menu-dir summary {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #bfcbd9;
  cursor: pointer;
  list-style: none;
}
.menu-dir summary::-webkit-details-marker { display: none; }
.menu-dir summary::after {
  content: "";
  margin-left: auto;
  border: 4px solid transparent;
  border-top-color: #bfcbd9;
}
.menu-dir[open] > summary::after {
  border-top-color: transparent;
  border-bottom-color: #bfcbd9;
  margin-top: -4px;
}
.side-nav .item:hover,
.menu-dir summary:hover { background: #263445; color: #fff; }
.side-nav .item.on { color: #409eff; background: #263445; }
.menu-dir .sub { background: #1f2d3d; }
.menu-dir .sub .item,
.menu-dir .sub summary { padding-left: 36px; }
.menu-dir .sub .sub .item,
.menu-dir .sub .sub summary { padding-left: 52px; }
.check-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.perm-tree { max-height: 320px; overflow: auto; padding: 4px 0; }
.perm-row { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.perm-fold {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.perm-fold::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  border: 4px solid transparent;
  border-left-color: #909399;
}
.perm-node.shut > .perm-row .perm-fold::before { border-left-color: #c0c4cc; }
.perm-fold.blank { cursor: default; }
.perm-fold.blank::before { display: none; }
.perm-children { margin-left: 18px; padding-left: 8px; border-left: 1px dashed #dcdfe6; }
.perm-node.shut > .perm-children { display: none; }
.check { display: flex; align-items: center; gap: 8px; color: var(--el-text-regular); }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 50px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e4e7ed;
}
.crumb { display: flex; align-items: center; gap: 8px; color: var(--el-text-secondary); }
.crumb a { color: var(--el-text-regular); }
.crumb a:hover { color: var(--el-color-primary); }
.crumb em { font-style: normal; color: var(--el-text); }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  cursor: pointer;
  color: var(--el-text-regular);
  padding: 6px 0 6px 8px;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: #909399;
  vertical-align: middle;
}
.user-drop {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 20;
  min-width: 140px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.user-role {
  padding: 6px 16px 8px;
  color: var(--el-text-secondary);
  font-size: 12px;
  border-bottom: 1px solid #ebeef5;
  margin-bottom: 4px;
}
.user-drop a,
.user-drop button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--el-text-regular);
  cursor: pointer;
  font: inherit;
}
.user-drop a:hover,
.user-drop button:hover { background: #ecf5ff; color: var(--el-color-primary); }
.user-drop form { margin: 0; }
.page { width: auto; margin: 16px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; flex: 1; font-size: 18px; font-weight: 600; }

.card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.card-head, .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
}
.card-head { border-bottom: 1px solid #ebeef5; }
.card-head h1, .card-title h1 { margin: 0; font-size: 16px; font-weight: 600; }
.card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-head h1 .muted { margin-left: 8px; font-size: 13px; font-weight: 400; }
.card-body { padding: 18px 20px; }
.card-foot { border-top: 1px solid #ebeef5; }
.muted { color: var(--el-text-secondary); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline label, .field.inline > span { white-space: nowrap; }
.field.grow.inline .control { flex: 1; width: auto; }
.field.fixed.inline .select { width: 160px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.grow { flex: 1 1 280px; }
.field.fixed { flex: 0 0 200px; }
.field label { color: var(--el-text-regular); }
.control, .select {
  height: 32px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--el-border);
  border-radius: 4px;
  background: #fff;
  color: var(--el-text);
  outline: none;
}
.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23909399' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
textarea.control { height: auto; padding: 8px 12px; }
.control:focus, .select:focus { border-color: var(--el-color-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid var(--el-border);
  background: #fff;
  color: var(--el-text-regular);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: var(--el-color-primary); border-color: #c6e2ff; background: #ecf5ff; }
.btn-primary { background: var(--el-color-primary); border-color: var(--el-color-primary); color: #fff; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; color: #fff; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-text {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--el-color-primary);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.btn-text:hover { color: #66b1ff; }
.btn-text.danger { color: var(--el-color-danger); }
.btn-text.danger:hover { color: #f78989; }
dialog.modal {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.5); }
.dialog-head { padding: 16px 20px; border-bottom: 1px solid #ebeef5; font-size: 16px; font-weight: 600; }
.dialog-body { padding: 20px; }
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #ebeef5;
}
.btn-danger {
  background: #fff;
  border-color: #fbc4c4;
  color: var(--el-color-danger);
}
.btn-danger:hover { color: var(--el-color-danger); border-color: #fbc4c4; background: #fef0f0; }
.with-unit { display: flex; align-items: stretch; width: 100%; }
.with-unit .control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.with-unit .unit {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--el-border);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: #f5f7fa;
  color: var(--el-text-regular);
}
.field small { font-size: 12px; line-height: 1.5; }
.actions { display: inline-flex; gap: 10px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.actions form { margin: 0; }
.actions .ops-sep {
  flex-shrink: 0;
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: #ebeef5;
}
a.btn-cert-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #faecd8;
  background: #fdf6ec;
  color: #b88230;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
a.btn-cert-outline:hover {
  border-color: var(--el-color-warning);
  color: #e6a23c;
  background: #fff;
}
a.btn-cert-outline.off {
  opacity: 0.55;
  pointer-events: none;
}
.cert-download-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 0;
  background: linear-gradient(90deg, #fdf6ec 0%, #fff 70%);
  border: 1px solid #faecd8;
  border-radius: 6px;
}
.cert-download-bar .cert-dl-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--el-text);
}
.cert-template-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--el-text);
}
.cert-template-field__label {
  white-space: nowrap;
  color: var(--el-text-secondary);
}
.cert-template-select {
  min-width: 11rem;
  max-width: 16rem;
  padding: 6px 10px;
  border: 1px solid var(--el-border);
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.cert-download-bar .hint {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  font-size: 13px;
  color: var(--el-text-secondary);
  line-height: 1.5;
}
.btn-cert {
  background: var(--el-color-warning);
  border-color: var(--el-color-warning);
  color: #fff;
}
.btn-cert:hover {
  background: #ebb563;
  border-color: #ebb563;
  color: #fff;
}
.cert-download-bar .btn-cert {
  min-width: 9rem;
}

.cert-export-progress {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 18px 16px;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.cert-export-progress[hidden] {
  display: none !important;
}
.cert-export-progress__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--el-text);
}
.cert-export-progress__detail {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--el-text-secondary);
  line-height: 1.45;
  word-break: break-all;
}
.cert-export-progress__track {
  height: 6px;
  border-radius: 3px;
  background: #ebeef5;
  overflow: hidden;
}
.cert-export-progress__bar {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #e6a23c, #f0c78a);
  transition: width 0.25s ease;
}

.table-wrap { overflow-x: auto; }
.table-wrap.fit { overflow: hidden; }
.table-wrap.fit table { table-layout: fixed; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #ebeef5; }
th { background: var(--el-fill); color: var(--el-text-regular); font-weight: 600; }
tbody tr:hover td { background: #f5f7fa; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-check { width: 40px; text-align: center; vertical-align: middle; }
.col-thumb { width: 88px; text-align: center; vertical-align: middle; }
.col-report_no { width: 16%; }
.col-conclusion { width: 14%; }
.col-mass { width: 10%; }
.col-sample_name { width: 18%; }
.col-client { width: 18%; }
.col-status { width: 88px; }
.col-deadline { width: 120px; }
.col-owner { width: 100px; }
.col-ops { width: 300px; }

.list-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  vertical-align: middle;
}
.list-thumb:hover { border-color: var(--el-color-primary); box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none !important; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: zoom-out;
}
.lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(98vw, 1280px);
  max-height: 96vh;
  padding: 4px;
}
.lightbox-img {
  display: block;
  max-width: min(98vw, 1280px);
  max-height: 94vh;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.lightbox-close:hover { background: #f5f5f5; }

.record-list { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 12px;
}
.tag-ok { color: #67c23a; background: #f0f9eb; border-color: #e1f3d8; }
.tag-bad { color: #f56c6c; background: #fef0f0; border-color: #fde2e2; }
.tag-wait { color: #e6a23c; background: #fdf6ec; border-color: #faecd8; }

.pager-summary { flex: 1; min-width: 0; white-space: nowrap; }
.pager {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--el-border);
  border-radius: 4px;
  background: #fff;
  color: var(--el-text-regular);
  flex-shrink: 0;
}
.pager .pager-prev,
.pager .pager-next {
  min-width: auto;
  padding: 0 10px;
  white-space: nowrap;
}
.pager .pager-ellipsis {
  min-width: 24px;
  padding: 0 2px;
  border-color: transparent;
  background: transparent;
  color: var(--el-text-secondary);
  pointer-events: none;
}
.pager .on { background: var(--el-color-primary); border-color: var(--el-color-primary); color: #fff; }
.pager .off { color: #c0c4cc; pointer-events: none; background: #fff; }

.section {
  margin: 4px 0 14px;
  padding-left: 10px;
  border-left: 3px solid var(--el-color-primary);
  font-size: 15px;
  font-weight: 600;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.wide { grid-column: 1 / -1; }
.form-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #ebeef5; }
.form-foot--certs .btn { white-space: nowrap; }

.card-body--split {
  padding-bottom: 20px;
}
.report-new-split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 46%);
  gap: 20px 24px;
  align-items: start;
}
.report-new-main {
  min-width: 0;
}
.cert-preview-panel {
  position: sticky;
  top: 12px;
  min-width: 0;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  background: #fafafa;
  padding: 14px 14px 12px;
}
.cert-preview-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cert-template-field--compact {
  margin: 0;
}
.cert-template-field--compact .cert-template-select {
  min-width: 10rem;
}
.cert-preview-panel__hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
}
.cert-preview-frame {
  position: relative;
  background: #e8eaed;
  border-radius: 6px;
  min-height: 360px;
  overflow: hidden;
}
.cert-preview-placeholder {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: var(--el-text-secondary);
  font-size: 13px;
}
.cert-preview-iframe {
  display: block;
  width: 100%;
  height: 360px;
  max-height: 75vh;
  border: 0;
  background: #e8eaed;
  vertical-align: top;
}
.qual-preview-scroll .cert-preview-iframe {
  height: auto;
  min-height: 70vh;
  max-height: none;
}

@media (max-width: 1100px) {
  .report-new-split:not(.qual-vision-split) {
    grid-template-columns: 1fr;
  }
  .report-new-split:not(.qual-vision-split) .cert-preview-panel {
    position: static;
  }
}

.upload-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  grid-column: 1 / -1;
}
.upload-stack .upload {
  width: 100%;
  min-height: 140px;
  padding: 16px 20px;
  box-sizing: border-box;
}
.upload-stack .picked-files-list {
  margin: 0;
  width: 100%;
}

.upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  width: 100%;
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
}
.upload:hover { border-color: var(--el-color-primary); }
.upload.upload--paste-active {
  border-color: var(--el-color-primary);
  box-shadow: inset 0 0 0 1px rgba(64, 158, 255, 0.35);
  background: #f0f7ff;
}
.picked-files-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  grid-column: 1 / -1;
}
.picked-files-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fff;
}
.picked-files-thumb,
.file-row-preview {
  cursor: zoom-in;
}
.picked-files-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #ebeef5;
}
.file-row-preview {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}
.picked-files-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  word-break: break-all;
  text-align: left;
}
.picked-files-remove {
  flex-shrink: 0;
  margin-left: auto;
}
.upload small { color: var(--el-text-secondary); pointer-events: none; }
.upload strong { pointer-events: none; }
.upload input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload input:disabled {
  cursor: not-allowed;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}
.file-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.file-row span { flex: 1; word-break: break-all; }
.empty { padding: 48px 16px; text-align: center; color: var(--el-text-secondary); }
.qr { display: block; width: 220px; height: 220px; margin: 8px auto 20px; }
.alert { margin-bottom: 12px; padding: 8px 12px; border-radius: 4px; color: #e6a23c; background: #fdf6ec; }

.admin-ops-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  min-width: 260px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  word-break: break-word;
}
.admin-ops-toast[hidden] {
  display: none !important;
}
.admin-ops-toast.is-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.admin-ops-toast.is-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.batch-results-wrap { margin-top: 22px; }
.batch-results-wrap .section { font-size: 16px; margin: 0 0 10px; }

.page--qual-vision {
  margin: 12px 16px 20px;
}
.page--qual-vision .card-body--split {
  padding-top: 14px;
}
.qual-vision-banner .qual-token-strip { margin: 0 0 10px; }
.qual-vision-banner {
  margin-bottom: 14px;
}
.qual-vision-split.report-new-split {
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 40%);
  gap: 20px 24px;
  align-items: stretch;
}
.qual-vision-split .report-new-main {
  min-width: 0;
  max-height: calc(100vh - 158px);
  overflow-y: auto;
  padding-right: 6px;
}
.qual-vision-split .cert-preview-panel {
  position: sticky;
  top: 58px;
  align-self: start;
  max-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  min-height: 480px;
}
.qual-vision-split-label {
  display: none;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--el-text-secondary);
  letter-spacing: 0.04em;
}
@media (min-width: 861px) {
  .qual-vision-split-label {
    display: block;
  }
  .qual-vision-split .report-new-main {
    border-right: 1px solid #ebeef5;
    padding-right: 20px;
  }
}
@media (max-width: 860px) {
  .qual-vision-split.report-new-split {
    grid-template-columns: 1fr;
  }
  .qual-vision-split .report-new-main {
    max-height: none;
    border-right: 0;
    padding-right: 0;
  }
  .qual-vision-split .cert-preview-panel {
    position: static;
    max-height: none;
  }
}
.cert-preview-frame--qual {
  flex: 1;
  min-height: 420px;
  max-height: none;
  display: flex;
  flex-direction: column;
}
.qual-preview-scroll {
  flex: 1;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding: 10px;
}
.qual-preview-sheet {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 22px 26px 26px;
  font-size: 11px;
  line-height: 1.5;
  color: #1f2937;
}
.qual-preview-watermark {
  text-align: center;
  color: #909399;
  font-size: 11px;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dcdfe6;
}
.qual-preview-title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.06em;
}
.qual-preview-meta {
  margin: 0 0 14px;
  font-size: 11px;
}
.qual-preview-meta dt {
  float: left;
  clear: left;
  width: 7.5em;
  color: #606266;
  margin: 0 0 4px;
}
.qual-preview-meta dd {
  margin: 0 0 4px;
  padding-left: 7.5em;
  word-break: break-word;
}
.qual-preview-block {
  margin-top: 14px;
}
.qual-preview-block h3 {
  margin: 0 0 8px;
  font-size: 12px;
  border-bottom: 1px solid #ebeef5;
  padding-bottom: 4px;
}
.qual-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.qual-preview-table th,
.qual-preview-table td {
  border: 1px solid #dcdfe6;
  padding: 5px 6px;
  vertical-align: top;
}
.qual-preview-table th {
  background: #f5f7fa;
  font-weight: 600;
}
.qual-preview-photo {
  margin-top: 12px;
  text-align: center;
}
.qual-preview-photo img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}
.qual-preview-warnings {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: #fdf6ec;
  border-radius: 4px;
  color: #e6a23c;
  font-size: 10px;
}
/* 资质工作台 — 首页字段与描述区 */
.page--qual-vision .qual-cover-fieldset .grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px 18px;
}
.page--qual-vision .qual-cover-fieldset .field.wide {
  grid-column: 1 / -1;
}
.page--qual-vision .qual-cover-fieldset .control,
.page--qual-vision .qual-cover-fieldset .select,
.page--qual-vision #qual-vision-editable .qual-vision-input {
  height: 38px;
  font-size: 14px;
  padding: 0 12px;
}
.page--qual-vision #qual-vision-editable textarea.control {
  min-height: 76px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.page--qual-vision .qual-cover-fieldset label > span,
.page--qual-vision #qual-vision-editable label > span {
  font-size: 13px;
  font-weight: 500;
  color: #303133;
}

/* 点位表容器 */
.qual-points-editor .table-wrap {
  margin-top: 10px;
}
.qual-points-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  background: #fff;
  max-width: 100%;
}
table.qual-points-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 13px;
}
table.qual-points-table th,
table.qual-points-table td {
  padding: 10px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #ebeef5;
  text-align: left;
}
table.qual-points-table thead th {
  background: #f5f7fa;
  color: #606266;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
table.qual-points-table tbody tr:last-child td {
  border-bottom: 0;
}
table.qual-points-table .control,
table.qual-points-table .select {
  width: 100%;
  min-width: 4.25rem;
  height: 38px;
  padding: 0 10px;
  font-size: 14px;
  box-sizing: border-box;
}
table.qual-points-table textarea.control {
  width: 100%;
  min-width: 10rem;
  min-height: 64px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}
table.qual-points-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
table.qual-points-table .btn-text {
  font-size: 13px;
  padding: 4px 0;
}

/* 豆包识别 · 主点位表 */
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table {
  min-width: 1080px;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(1),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(1) {
  width: 4.5rem;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(2),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(2),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(3),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(3) {
  min-width: 11.5rem;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(4),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(4) {
  min-width: 9.5rem;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(5),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(5),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(6),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(6),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(7),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(7) {
  min-width: 5.5rem;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(8),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(8) {
  min-width: 12rem;
}
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table th:nth-child(9),
.qual-points-editor:not(.qual-page-points-editor) table.qual-points-table td:nth-child(9) {
  min-width: 8.5rem;
  white-space: nowrap;
}

/* P3–P6 报告点位表 */
.qual-page-points-editor table.qual-points-table {
  min-width: 960px;
}
.qual-page-points-editor table.qual-points-table th:nth-child(1),
.qual-page-points-editor table.qual-points-table td:nth-child(1) {
  width: 4.5rem;
}
.qual-page-points-editor table.qual-points-table th:nth-child(2),
.qual-page-points-editor table.qual-points-table td:nth-child(2),
.qual-page-points-editor table.qual-points-table th:nth-child(3),
.qual-page-points-editor table.qual-points-table td:nth-child(3) {
  min-width: 10.5rem;
}
.qual-page-points-editor table.qual-points-table th:nth-child(4),
.qual-page-points-editor table.qual-points-table td:nth-child(4) {
  min-width: 9rem;
}
.qual-page-points-editor[data-page="p3"] table.qual-points-table th:nth-child(n + 5),
.qual-page-points-editor[data-page="p3"] table.qual-points-table td:nth-child(n + 5),
.qual-page-points-editor[data-page="p4"] table.qual-points-table th:nth-child(n + 5),
.qual-page-points-editor[data-page="p4"] table.qual-points-table td:nth-child(n + 5) {
  min-width: 5.75rem;
}
.qual-page-points-editor[data-page="p4"] table.qual-points-table th:nth-child(9),
.qual-page-points-editor[data-page="p4"] table.qual-points-table td:nth-child(9) {
  min-width: 8.5rem;
}
.qual-page-points-editor[data-page="p5"] table.qual-points-table {
  min-width: 1040px;
}
.qual-page-points-editor[data-page="p5"] table.qual-points-table th:nth-child(n + 4),
.qual-page-points-editor[data-page="p5"] table.qual-points-table td:nth-child(n + 4) {
  min-width: 5.75rem;
}
.qual-page-points-editor[data-page="p5"] table.qual-points-table th:nth-child(9),
.qual-page-points-editor[data-page="p5"] table.qual-points-table td:nth-child(9) {
  min-width: 8.5rem;
}
.qual-page-points-editor[data-page="p6"] table.qual-points-table th:nth-child(5),
.qual-page-points-editor[data-page="p6"] table.qual-points-table td:nth-child(5) {
  min-width: 16rem;
}

.qual-points-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}
.page--qual-vision #qual-workbench .section {
  margin-top: 24px;
  margin-bottom: 6px;
  font-size: 15px;
}
.page--qual-vision #qual-workbench .muted {
  font-size: 13px;
  line-height: 1.5;
}
.qual-workbench-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--el-text-secondary);
  font-size: 13px;
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  background: #fafafa;
}
.qual-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin: 0 0 12px;
}
.qual-token-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.qual-token-strip span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  background: #f7f8fa;
  border: 1px solid #ebeef5;
  border-radius: 6px;
}
.qual-token-strip b {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: #303133;
  font-variant-numeric: tabular-nums;
}
.qual-token-strip em {
  font-style: normal;
  font-size: 12px;
  color: #909399;
}
.qual-token-note { margin: 0; font-size: 12px; }
.qual-defaults-section {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #303133;
}
.qual-status-pill.ok {
  color: #1a7f37;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.qual-status-pill.warn {
  color: #b45309;
  background: #fdf6ec;
  border: 1px solid #faecd8;
}
.qual-sample-photo-bar {
  margin: 16px 0 8px;
  padding: 12px 14px;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  background: #fafbfc;
}
.qual-sample-photo-bar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.qual-sample-photo-bar__title {
  font-weight: 600;
  font-size: 13px;
}
.qual-sample-photo-bar__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}
.qual-sample-thumb-btn {
  padding: 0;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  line-height: 0;
}
.qual-sample-thumb-btn img {
  display: block;
  max-width: 160px;
  max-height: 120px;
  object-fit: contain;
}
.qual-sample-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.qual-sample-photo-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.qual-analyze-meta {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #1a7f37;
}
.qual-vision-analyzing .qual-points-editor {
  opacity: 0.72;
}
.qual-vision-analyzing #qual-analyze-btn {
  cursor: wait;
}
.qual-cover-fieldset {
  margin: 12px 0 0;
  padding: 12px 14px 4px;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  background: #fafbfc;
}
.qual-cover-fieldset--locked {
  opacity: 0.92;
}
.qual-cover-legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
}
.qual-cover-fieldset--locked .qual-cover-input,
.qual-cover-fieldset--locked #qual-report-no,
.qual-cover-fieldset--locked #qual-product-type {
  cursor: not-allowed;
  background: #f5f7fa;
}
.qual-vision-editable--locked {
  opacity: 0.92;
}
.qual-vision-editable--locked .qual-vision-input,
.qual-vision-editable--locked .qual-points-editor input,
.qual-vision-editable--locked .qual-points-editor select,
.qual-vision-editable--locked .qual-points-editor textarea,
.qual-vision-editable--locked .qual-points-editor button,
.qual-vision-editable--locked .qual-page-points-editor input,
.qual-vision-editable--locked .qual-page-points-editor select,
.qual-vision-editable--locked .qual-page-points-editor textarea,
.qual-vision-editable--locked .qual-page-points-editor button {
  cursor: not-allowed;
  background: #f5f7fa;
}
.qual-page-points-editor--display-only {
  opacity: 0.95;
}
.qual-page-points-editor--display-only input,
.qual-page-points-editor--display-only select,
.qual-page-points-editor--display-only textarea,
.qual-page-points-editor--display-only button {
  cursor: default;
  background: #f5f7fa;
  pointer-events: none;
}

@media (max-width: 760px) {
  .shell { display: block; }
  .side { width: auto; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .menu-dir { width: 100%; }
  .page { width: auto; margin: 12px; }
  .grid, .filters { display: flex; flex-direction: column; }
  .field.fixed { flex-basis: auto; }
  .top { padding: 0 12px; }
  .actions { flex-wrap: wrap; justify-content: flex-start; white-space: normal; }
  .table-wrap.fit { display: none; }
  .record-list { display: block; }
  .record { padding: 14px 16px; border-top: 1px solid #ebeef5; }
  .record-top { display: flex; align-items: center; gap: 12px; }
  .record-top .list-thumb { flex: none; }
  .record-top strong { flex: 1; min-width: 0; }
  .record-top strong { min-width: 0; font-size: 15px; word-break: break-all; }
  .record dl { margin: 10px 0 0; }
  .record dl div { display: flex; gap: 12px; margin-top: 6px; font-size: 13px; }
  .record dt { width: 64px; flex: none; color: var(--el-text-secondary); }
  .record dd { margin: 0; min-width: 0; word-break: break-all; }
  .record .actions { margin-top: 12px; }
  .pager { flex-wrap: wrap; }
  .page--defaults { padding: 16px 12px; }
  .page--defaults .qual-defaults-trio { display: flex; }
}

.page--defaults {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: auto;
  min-height: 0;
  margin: 16px;
  box-sizing: border-box;
}
.page--defaults .card {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.page--defaults .card-head { padding: 18px 24px; }
.page--defaults .card-head h1 { font-size: 18px; }
.page--defaults .card-body { flex: 1; padding: 22px 24px 20px; gap: 18px; }
.page--defaults .qual-token-strip { gap: 16px; }
.page--defaults .qual-token-strip span { padding: 20px 22px; border-radius: 8px; }
.page--defaults .qual-token-strip b { font-size: 30px; }
.page--defaults .qual-token-strip em { font-size: 13px; }
.page--defaults .qual-defaults-section { font-size: 15px; margin-top: 6px; }
.page--defaults .field > span { font-size: 13px; }
.page--defaults .control { height: 40px; font-size: 14px; }
.page--defaults textarea.control { height: auto; min-height: 72px; padding: 10px 12px; line-height: 1.5; }
.page--defaults .qual-defaults-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page--defaults .form-foot {
  justify-content: center;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 0;
}
.page--defaults .form-foot .btn {
  min-width: 280px;
  height: 52px;
  padding: 0 56px;
  font-size: 18px;
  border-radius: 6px;
}
