/* ============================================================
   GEO 可信信源数字档案平台 · 动态页面补充样式
   仅补充 style.css 未覆盖的列表、空态、哈希与错误页
   ============================================================ */

/* ---------- 查询入口（动态页复用 trace-search 结构） ---------- */
.archive-search { max-width: 620px; }
.archive-search .ts-btn { white-space: nowrap; }

.side-card .trace-search {
  max-width: none;
  box-shadow: var(--shadow-sm);
  padding: 8px 8px 8px 16px;
}
.side-card .trace-search .ts-btn { padding: 11px 20px; font-size: 14px; }
.side-card .trace-search input { font-size: 13.5px; }

/* ---------- 空态 ---------- */
.empty-state {
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 38px 26px;
  text-align: center;
}
.empty-state .es-t {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state .es-d { font-size: 13.5px; color: var(--ink-3); line-height: 1.8; }
.empty-state .es-d b { color: var(--moss); font-weight: 500; }

/* ---------- 媒体占位（封面为空时） ---------- */
.media-fallback {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
  background:
    radial-gradient(320px 180px at 78% 8%, rgba(141, 179, 156, 0.35), transparent 66%),
    linear-gradient(150deg, var(--forest), var(--forest-2));
  color: rgba(246, 243, 234, 0.82);
}
.media-fallback .mf-mark {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--harvest-2);
}
.media-fallback .mf-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(246, 243, 234, 0.6);
}

/* ---------- 归档文件列表 ---------- */
.file-list { display: grid; gap: 10px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.file-row:hover {
  border-color: rgba(63, 120, 87, 0.45);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.file-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(63, 120, 87, 0.1);
  color: var(--moss);
}
.file-ico svg { width: 20px; height: 20px; }
.file-ico.pdf {
  background: rgba(176, 86, 58, 0.1);
  color: var(--clay);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.file-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.file-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta { font-size: 12px; color: var(--ink-3); }
.file-meta .tag { padding: 2px 9px; font-size: 11px; margin-right: 6px; }
.file-sha {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--moss);
  letter-spacing: 0.02em;
  word-break: break-all;
}
.file-open {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--moss);
  white-space: nowrap;
}
.file-row:hover .file-open { color: var(--forest); }

/* ---------- 证书卡片内文件缩略 ---------- */
.cert-card .cert-thumb b { letter-spacing: 0.08em; }
.cert-card .cc-meta .ok { color: #2f6046; }
.status.expired { color: #974831; }
.status.expired::before { background: var(--clay); box-shadow: 0 0 0 3px rgba(176, 86, 58, 0.16); }
.status.review { color: #8a621c; }
.status.review::before { background: var(--harvest); box-shadow: 0 0 0 3px rgba(191, 138, 43, 0.18); }

/* ---------- 年度归档哈希 ---------- */
/* 5 列紧凑布局：内容换行收缩，任何宽度下都不产生滚动条 */
.hash-table { table-layout: auto; }
.hash-table th { white-space: nowrap; }
.hash-table td { white-space: normal; vertical-align: top; padding: 13px 12px; }
.hash-table .cell-sub { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.hash-table .hash-nodes { min-width: 270px; }
.hash-table .hash-nodes .flag { margin: 2px 4px 2px 0; }
.hash-table td.nw { white-space: nowrap; word-break: keep-all; }
.hash-cell {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--forest);
  letter-spacing: 0.03em;
  word-break: break-all;
  cursor: help;
  border-bottom: 1px dashed rgba(63, 120, 87, 0.4);
}
.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.flag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.flag.sealed { color: #2f6046; background: rgba(63, 120, 87, 0.1); }
.flag.warning { color: #974831; background: rgba(176, 86, 58, 0.14); }
.flag.unsealed { color: var(--ink-3); background: var(--bg-2); }

.data-table tr.row-warning { background: rgba(176, 86, 58, 0.07); }
.data-table tr.row-warning:hover { background: rgba(176, 86, 58, 0.11); }
.data-table tr.row-warning td:first-child { box-shadow: inset 3px 0 0 var(--clay); }

.yc-card.warning {
  border-color: rgba(176, 86, 58, 0.55);
  background: linear-gradient(160deg, var(--surface), rgba(176, 86, 58, 0.06));
}
.yc-card.warning .yc-year::after {
  content: "WARNING";
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--clay);
  border: 1px solid rgba(176, 86, 58, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
}
.yc-card.warning .yc-dot {
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(176, 86, 58, 0.18);
}
.yc-card.warning .yc-hash { color: var(--clay); }

/* ---------- 企业页统计 ---------- */
.ent-stats { margin-bottom: 52px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 产品网格列数控制 ---------- */
.prod-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.flow.flow-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 产品卡规格/批次 ---------- */
.prod-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
.prod-meta b { color: var(--ink-2); font-weight: 500; font-family: var(--mono); }

/* ---------- 侧栏档案导航 ---------- */
.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.side-actions .btn { width: 100%; padding: 9px 10px; font-size: 13px; }

/* ---------- 产品页：年度哈希 + 扫码次数 ---------- */
.hash-overview {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 22px;
  align-items: stretch;
}
.scan-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--forest), var(--forest-2));
  color: var(--bg);
  border-radius: var(--r);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}
.scan-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(226, 200, 138, 0.22), transparent);
}
.scan-card .sc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--harvest-2);
  position: relative;
  z-index: 2;
}
.scan-card .sc-num-big {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--bg);
  position: relative;
  z-index: 2;
}
.scan-card .sc-num-big i {
  font-style: normal;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--harvest-2);
  margin-left: 4px;
}
.scan-card .sc-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(246, 243, 234, 0.66);
  position: relative;
  z-index: 2;
}
.scan-card .text-link {
  color: var(--harvest-2);
  align-self: flex-start;
  position: relative;
  z-index: 2;
}
.scan-card .text-link:hover { color: #fff; border-bottom-color: var(--harvest-2); }

/* ---------- 四步校验卡 ---------- */
.sync-card .sc-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.75;
}
.sync-card .sc-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--harvest);
  margin-bottom: 4px;
  display: block;
}

/* ---------- 产品页档案提示 ---------- */
.pd-price-note p b { color: var(--forest); }
.pd-specs .v a { color: var(--moss); border-bottom: 1px dashed rgba(63, 120, 87, 0.45); }
.pd-specs .v a:hover { color: var(--forest); border-bottom-color: var(--harvest); }

/* ---------- 首页可核验说明 ---------- */
.verify-prose {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--harvest);
  border-radius: var(--r);
  padding: 24px 26px;
}
.verify-prose h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.verify-prose p { font-size: 14.5px; color: var(--ink-2); }
.verify-prose b { color: var(--forest); font-weight: 600; }
.verify-prose .mono { color: var(--moss); }

/* ---------- 错误页 ---------- */
.error-section { min-height: 62vh; display: grid; place-items: center; }
.error-card {
  max-width: 640px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 54px 34px 46px;
  position: relative;
  overflow: hidden;
}
.error-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--forest), var(--harvest));
}
.error-code {
  display: block;
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 104px);
  font-weight: 900;
  line-height: 1;
  color: var(--bg-3);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.error-card .eyebrow { justify-content: center; }
.error-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  margin: 14px 0 12px;
}
.error-msg {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto 30px;
  line-height: 1.85;
}
.error-acts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 1100px) {
  .prod-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .flow.flow-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .archive-search { max-width: none; }
  .sync-grid { grid-template-columns: 1fr; }
  .prod-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .flow.flow-3 { grid-template-columns: 1fr; gap: 26px; }
  .flow.flow-3::before { display: none; }
  .file-row { flex-wrap: wrap; }
  .file-open { margin-left: 54px; }
  .cert-card .cert-thumb.real { width: 100%; aspect-ratio: 16 / 10; }
  .ent-stats { margin-bottom: 38px; }
  .hash-overview { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .prod-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .error-card { padding: 42px 22px 36px; }
  .file-name { white-space: normal; word-break: break-all; }
}

/* ---------- 存证核验 / 存证凭证 ---------- */
.verify-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.verify-banner.ok { border-color: rgba(63, 120, 87, 0.35); background: rgba(63, 120, 87, 0.08); }
.verify-banner.bad { border-color: rgba(176, 86, 58, 0.45); background: rgba(176, 86, 58, 0.1); }
.verify-banner b { font-family: var(--serif); font-size: 15px; white-space: nowrap; }
.verify-banner span { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }

.verify-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}
.verify-meta > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.verify-meta .vm-k { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; letter-spacing: 0.04em; }
.verify-meta .vm-v { font-size: 13.5px; color: var(--ink); word-break: break-all; }
.verify-meta .vm-v.mono { font-family: var(--mono); font-size: 12px; color: var(--forest); }

.verify-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }

.attest-sheet {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 46px 52px;
  box-shadow: 0 24px 60px rgba(28, 74, 56, 0.08);
}
.attest-sheet h1 { font-family: var(--serif); font-size: 26px; text-align: center; margin: 0 0 6px; letter-spacing: 0.06em; }
.attest-sheet .attest-sub { text-align: center; color: var(--ink-3); font-size: 13px; margin-bottom: 30px; }
.attest-row { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.attest-row:last-child { border-bottom: 0; }
.attest-row .k { width: 124px; flex-shrink: 0; color: var(--ink-3); }
.attest-row .v { color: var(--ink); word-break: break-all; }
.attest-row .v.mono { font-family: var(--mono); font-size: 12px; color: var(--forest); }
.attest-foot { margin-top: 34px; display: flex; justify-content: space-between; gap: 20px; font-size: 12.5px; color: var(--ink-3); }

@media print {
  .topbar, .header, .footer, .verify-actions, .breadcrumb { display: none !important; }
  body { background: #fff; }
  .attest-sheet { box-shadow: none; border: 0; padding: 0; max-width: none; }
}

/* 资质图集：页内预览 */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 20, 16, 0.82);
}
.cert-lightbox.open { display: flex; }
.cl-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px 18px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}
.cl-stage {
  flex: 1;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: auto;
  background: #f5f4ef;
  border-radius: 10px;
}
.cl-stage img { display: block; max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; }
.cl-doc {
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--forest);
  font-size: 14px;
  text-decoration: none;
  word-break: break-all;
}
.cl-cap { padding: 10px 4px 2px; font-size: 13px; color: var(--ink-3); text-align: center; }
.cl-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-top: 10px; }
.cl-thumb {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-3);
  font-size: 12px;
  cursor: pointer;
}
.cl-thumb.active { border-color: var(--forest); color: #fff; background: var(--forest); }
.cl-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(21, 35, 27, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cl-prev { left: -12px; }
.cl-next { right: -12px; }
@media (max-width: 720px) {
  .cl-prev { left: 4px; }
  .cl-next { right: 4px; }
}

