/* ==========================================================================
   管理后台 · 布局样式
   ========================================================================== */
.admin-layout { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.admin-side {
  width: 232px; flex: 0 0 232px;
  background: var(--brand-900); color: #d8e5e0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-500), var(--brand-500));
  color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}
.brand-name { color: #fff; font-weight: 600; font-size: 14.5px; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: #8fa8a0; margin-top: 1px; }

.side-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-group {
  padding: 14px 10px 7px; font-size: 11px; letter-spacing: .08em;
  color: #7d968e; text-transform: uppercase; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; margin-bottom: 2px;
  border-radius: 8px; color: #c2d5cf; font-size: 13.5px;
  cursor: pointer; transition: all .14s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--brand-600); color: #fff; font-weight: 500; }
.nav-item .ni { width: 17px; text-align: center; opacity: .85; font-size: 13px; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px;
  border-radius: 10px; background: rgba(255, 255, 255, .14);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .26); }

.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .09); }
.side-org { padding: 9px 11px; background: rgba(255, 255, 255, .06); border-radius: 8px; }
.org-name { color: #fff; font-size: 13px; font-weight: 500; }
.org-role { font-size: 11.5px; color: #8fa8a0; margin-top: 1px; }

/* ---------------- 顶栏 ---------------- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  height: 60px; flex: 0 0 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.crumb { font-size: 13.5px; color: var(--ink-500); }
.crumb-root { color: var(--ink-400); }
.crumb-sep { margin: 0 7px; color: var(--ink-400); }
.crumb #crumbCur { color: var(--ink-900); font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.top-user .tu-name { font-size: 13px; font-weight: 500; line-height: 1.3; }
.top-user .tu-role { font-size: 11.5px; color: var(--ink-400); line-height: 1.3; }

.admin-body { padding: 24px 26px 60px; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 22px;
}
.stat-card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: ''; position: absolute; right: -28px; top: -28px;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--brand-50);
}
.stat-card.gold::after { background: var(--gold-100); }
.stat-card.blue::after { background: var(--info-bg); }
.stat-label { font-size: 12.5px; color: var(--ink-500); margin-bottom: 7px; position: relative; }
.stat-value {
  font-size: 30px; font-weight: 650; line-height: 1.1;
  font-variant-numeric: tabular-nums; position: relative;
}
.stat-value .unit { font-size: 13px; font-weight: 400; color: var(--ink-400); margin-left: 4px; }
.stat-foot { margin-top: 9px; font-size: 12px; color: var(--ink-400); position: relative; }
.stat-foot .up { color: var(--ok); font-weight: 500; }

/* ---------------- 页面头 ---------------- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 650; }
.page-head p { margin: 0; font-size: 13px; color: var(--ink-500); }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line-soft);
}
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 190px; }

/* ---------------- 流程条 ---------------- */
.flow-strip {
  display: flex; align-items: stretch; gap: 0; margin-bottom: 22px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.flow-step {
  flex: 1; padding: 16px 14px; position: relative;
  border-right: 1px dashed var(--line);
}
.flow-step:last-child { border-right: none; }
.flow-step .fs-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; margin-bottom: 8px;
}
.flow-step.done .fs-num { background: var(--brand-600); color: #fff; }
.flow-step.cur .fs-num { background: var(--gold-500); color: #fff; }
.flow-step .fs-t { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.flow-step .fs-d { font-size: 11.5px; color: var(--ink-400); line-height: 1.5; }

/* ---------------- 成果列表卡 ---------------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ach-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
  display: flex; flex-direction: column;
}
.ach-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cddbd5; }
.ach-top {
  padding: 15px 18px 13px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--brand-50), #fff);
}
.ach-code { font-size: 11.5px; color: var(--brand-600); font-weight: 600; letter-spacing: .04em; }
.ach-title {
  font-size: 15px; font-weight: 600; margin: 6px 0 8px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ach-company { font-size: 12.5px; color: var(--ink-500); display: flex; align-items: center; gap: 5px; }
.ach-logo {
  width: 20px; height: 20px; object-fit: contain;
  border-radius: 3px; background: #fff;
  border: 1px solid var(--line); flex: 0 0 auto;
}
.ach-logo-ph { font-size: 13px; line-height: 1; flex: 0 0 auto; }
.ach-meta {
  padding: 12px 18px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 14px; font-size: 12.5px; flex: 1;
}
.ach-meta .m-k { color: var(--ink-400); font-size: 11.5px; margin-bottom: 2px; }
.ach-meta .m-v { color: var(--ink-700); word-break: break-all; }
.ach-foot {
  padding: 12px 18px; border-top: 1px solid var(--line-soft);
  display: flex; gap: 8px; background: #fbfcfc;
}
.ach-foot .btn { flex: 1; }

/* ---------------- 证书查看弹窗 ---------------- */
.cert-preview {
  background: #eef1f0; border-radius: var(--radius);
  padding: 14px; overflow: hidden;
}
.cp-stage { position: relative; overflow: hidden; width: 100%; }
/* 证书原尺寸 1122×820，整体用 transform 等比缩放，避免变形与裁切 */
.cp-frame {
  display: block; width: 1122px; height: 820px;
  border: 1px solid var(--line); border-radius: 6px; background: #fcfaf2;
  transform-origin: top left;
}
.cp-info { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.cp-row {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft); font-size: 13px;
}
.cp-row .cp-k { flex: 0 0 66px; color: var(--ink-400); }
.cp-row .cp-v { flex: 1; color: var(--ink-900); word-break: break-all; }

/* ---------------- 二维码区 ---------------- */
.qr-split { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.qr-box {
  padding: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); flex: 0 0 auto;
  line-height: 0;
}
/* createSvgTag 在 scalable 模式下输出 width/height=100%，
   置于 flex 容器会塌缩为 0，故显式指定像素尺寸 */
.qr-box svg { display: block; width: 208px; height: 208px; }
.qr-box img { display: block; width: 208px; height: 208px; }
.qr-info { flex: 1; min-width: 250px; }
.qr-info .qi-row {
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft); font-size: 13px;
}
.qr-info .qi-row:last-child { border-bottom: none; }
.qr-info .qi-k { color: var(--ink-400); flex: 0 0 92px; }
.qr-info .qi-v { color: var(--ink-900); word-break: break-all; }
.url-box {
  margin-top: 14px; padding: 10px 12px;
  background: #f6f9f8; border: 1px dashed var(--line);
  border-radius: 8px; font-size: 12px; color: var(--ink-500);
  word-break: break-all; font-family: ui-monospace, Consolas, monospace;
}

/* ---------------- 上传 ---------------- */
.upload-box {
  border: 1.5px dashed #cfdcd7; border-radius: var(--radius);
  padding: 22px; text-align: center; cursor: pointer;
  background: #fbfdfc; transition: all .16s ease;
}
.upload-box:hover { border-color: var(--brand-500); background: var(--brand-50); }
.upload-box .up-ico { font-size: 26px; opacity: .45; margin-bottom: 6px; }
.upload-box .up-t { font-size: 13px; color: var(--ink-500); }
.upload-box .up-t b { color: var(--brand-600); }
.lic-preview {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fbfdfc;
}
.lic-preview img {
  width: 148px; border-radius: 6px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

/* ---------------- 公司 Logo 预览 ---------------- */
.logo-preview {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fbfdfc;
}
.logo-preview img {
  width: 76px; height: 76px; object-fit: contain;
  border-radius: 8px; border: 1px solid var(--line);
  background: #fff; padding: 6px;
  box-shadow: var(--shadow-sm);
}

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-500);
}
.tl-time { font-size: 11.5px; color: var(--ink-400); }
.tl-act { font-size: 13.5px; font-weight: 500; margin: 2px 0 3px; }
.tl-det { font-size: 12.5px; color: var(--ink-500); word-break: break-all; }

/* ---------------- 核验台 ---------------- */
.verify-scan {
  display: grid; place-items: center; padding: 40px 20px;
  border: 2px dashed var(--line); border-radius: var(--radius-lg);
  background: #fbfdfc; text-align: center;
}
.verify-scan .vs-ico { font-size: 44px; opacity: .35; margin-bottom: 12px; }
.verify-result {
  margin-top: 18px; padding: 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: #fff;
}
.vr-ok { border-color: #b8ddc9; background: var(--ok-bg); }
.vr-bad { border-color: #f0c4bf; background: var(--danger-bg); }
.vr-head { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; margin-bottom: 14px; }
.vr-ok .vr-head { color: var(--ok); }
.vr-bad .vr-head { color: var(--danger); }

/* ---------------- 详情描述列表 ---------------- */
.desc-list { display: grid; grid-template-columns: 128px 1fr; gap: 0; font-size: 13.5px; }
.desc-list dt {
  padding: 11px 14px 11px 0; color: var(--ink-400);
  border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.desc-list dd {
  margin: 0; padding: 11px 0; color: var(--ink-900);
  border-bottom: 1px solid var(--line-soft); word-break: break-word;
}
.desc-list dt:last-of-type, .desc-list dd:last-of-type { border-bottom: none; }
.desc-list .sub { color: var(--ink-500); font-size: 12.5px; }

/* ---------------- 分栏 ---------------- */
.split-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1180px) { .split-2 { grid-template-columns: 1fr; } }

/* ---------------- 二维码列（列表内）---------------- */
.qr-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-600);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.qr-cell:hover { color: var(--brand-700); border-bottom-color: currentColor; }
.qr-cell-icon { font-size: 14px; line-height: 1; opacity: .8; }

/* ---------------- 二维码图片弹窗 ---------------- */
.qr-img-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.qr-img-box {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  line-height: 0;
}
.qr-img-box svg { display: block; width: 240px; height: 240px; }
.qr-img-box img { display: block; width: 240px; height: 240px; }
.qr-img-meta { flex: 1; min-width: 250px; }
.qr-img-meta .qi-row {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.qr-img-meta .qi-row:last-child { border-bottom: none; }
.qr-img-meta .qi-k { color: var(--ink-400); flex: 0 0 88px; }
.qr-img-meta .qi-v { color: var(--ink-900); flex: 1; word-break: break-all; }
