/* ===========================================================
   检测报告查询平台 - 全站样式
   浅色主题 / PC 优先 / 移动端自适应
   =========================================================== */
:root {
  --blue: #0b4f9e;
  --blue-d: #073a75;
  --blue-l: #e9f2fc;
  --red: #c8102e;
  --green: #5aa832;
  --ink: #17293f;
  --muted: #5c6f83;
  --line: #e3e9f1;
  --bg: #f4f7fb;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(13, 60, 110, .08);
  --shadow-lg: 0 8px 30px rgba(13, 60, 110, .14);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部 ---------- */
.topbar {
  background: #0a2d55;
  color: #cfe0f2;
  font-size: 13px;
  height: 36px;
  line-height: 36px;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #cfe0f2; }
.topbar a:hover { color: #fff; }
.topbar .sep { margin: 0 10px; opacity: .45; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 6px rgba(13, 60, 110, .05);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 40px; width: auto; }
.brand .divider { width: 1px; height: 34px; background: var(--line); }
.brand .site-name { font-size: 19px; font-weight: 700; color: var(--blue-d); letter-spacing: .5px; }
.brand .site-sub { font-size: 12px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { background: var(--blue-l); color: var(--blue); }
.nav a.active { background: var(--blue); color: #fff; }
.nav a.admin-link { color: var(--muted); font-size: 13px; border: 1px solid var(--line); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  font-size: 20px;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--blue);
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 74px 0 84px;
  background: linear-gradient(120deg, rgba(7, 45, 88, .93) 0%, rgba(11, 79, 158, .86) 55%, rgba(19, 106, 190, .78) 100%),
              url("../img/hero-lab.jpg") center/cover no-repeat;
}
.hero h1 { font-size: 40px; letter-spacing: 1px; margin-bottom: 12px; }
.hero .lead { font-size: 17px; color: #dbe9f8; max-width: 690px; margin-bottom: 30px; }
.hero .kicker {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 100px;
  padding: 4px 16px;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.search-panel {
  background: var(--white);
  border-radius: 14px;
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-lg);
  max-width: 760px;
  color: var(--ink);
}
.search-panel .sp-title { font-weight: 700; font-size: 17px; margin-bottom: 14px; color: var(--blue-d); }
.search-panel .sp-title span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }
.search-form { display: flex; gap: 12px; }
.search-form input[type="text"] {
  flex: 1;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color .2s;
  min-width: 0;
}
.search-form input[type="text"]:focus { outline: none; border-color: var(--blue); }
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: #fff !important;
  padding: 13px 30px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.btn:hover { background: var(--blue-d); }
.btn.red { background: var(--red); }
.btn.red:hover { background: #a00d25; }
.btn.ghost { background: var(--white); color: var(--blue) !important; border: 1px solid var(--blue); }
.btn.ghost:hover { background: var(--blue-l); }
.btn.sm { padding: 8px 16px; font-size: 14px; }
.btn.block { display: block; width: 100%; text-align: center; }
.search-tips { margin-top: 12px; font-size: 13px; color: var(--muted); }
.search-tips code { background: var(--blue-l); color: var(--blue-d); padding: 2px 6px; border-radius: 4px; }

/* ---------- 资质条 ---------- */
.trust-bar { background: var(--white); border-bottom: 1px solid var(--line); padding: 18px 0; }
.trust-bar .wrap { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.trust-bar img.cn { height: 46px; }
.trust-bar img.ma { height: 56px; }
.trust-bar .trust-text { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 30px; }

/* ---------- 内页页头 ---------- */
.page-head {
  background: linear-gradient(120deg, #073a75, #0b4f9e);
  color: #fff;
  padding: 34px 0;
}
.page-head .crumbs { font-size: 13px; color: #bcd5ee; margin-bottom: 10px; }
.page-head .crumbs a { color: #bcd5ee; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head p { color: #cfe2f6; margin: 8px 0 0; }

/* ---------- 通用区块 ---------- */
.section { padding: 62px 0; }
.section.alt { background: var(--white); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; color: var(--blue-d); }
.section-head h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: var(--red);
  margin: 14px auto 0;
  border-radius: 2px;
}
.section-head p { color: var(--muted); margin-top: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 34px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.stat .num small { font-size: 16px; font-weight: 500; margin-left: 2px; }
.stat .label { color: var(--muted); font-size: 14px; margin-top: 6px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.svc-card img { height: 190px; object-fit: cover; width: 100%; }
.svc-card .body { padding: 20px 22px 24px; flex: 1; }
.svc-card h3 { font-size: 18px; color: var(--blue-d); }
.svc-card p { color: var(--muted); font-size: 14px; margin: 0; }

.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 34px; margin-top: 8px; }
.feature-list li { list-style: none; padding-left: 26px; position: relative; color: var(--ink); }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 700;
}
.feature-list { padding: 0; }

/* ---------- 数据表 ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--blue-l); color: var(--blue-d); font-weight: 700; white-space: nowrap; }
table.data tbody tr:hover { background: #f8fbff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.no { font-family: Consolas, Monaco, monospace; color: var(--blue-d); font-weight: 600; white-space: nowrap; }
.mono { font-family: Consolas, Monaco, monospace; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #eaf6e4; color: #3d7c1f; }
.badge-blue { background: var(--blue-l); color: var(--blue-d); }
.badge-red { background: #fdecef; color: var(--red); }

/* ---------- 报告详情 ---------- */
.report-head {
  background: linear-gradient(120deg, var(--blue-d), var(--blue));
  color: #fff;
  padding: 30px 0 34px;
}
.report-head .crumbs { font-size: 13px; color: #bcd5ee; margin-bottom: 12px; }
.report-head .crumbs a { color: #bcd5ee; }
.report-head h1 { font-size: 28px; margin-bottom: 6px; }
.report-head .no-line { font-size: 15px; color: #cfe2f6; }
.report-head .no-line b { font-family: Consolas, Monaco, monospace; font-size: 19px; color: #fff; letter-spacing: 1px; }
.report-head .head-badges { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.report-head .head-badges .badge { background: rgba(255, 255, 255, .16); color: #fff; }

.report-body { padding: 34px 0 60px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.panel > h2 {
  font-size: 17px;
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--blue-d);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel > h2::before { content: ""; width: 4px; height: 16px; background: var(--blue); border-radius: 2px; }
.panel .panel-body { padding: 20px; }
.panel .panel-body.tight { padding: 0; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kv .row { display: flex; border-bottom: 1px dashed var(--line); padding: 11px 0; }
.kv .row.wide { grid-column: 1 / -1; }
.kv .k { width: 112px; flex: none; color: var(--muted); }
.kv .v { flex: 1; color: var(--ink); word-break: break-word; font-weight: 500; }
.kv .row:last-child { border-bottom: none; }

.verdict-box {
  background: #f2f9ee;
  border: 1px solid #cfe6c0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 16px 18px;
  color: #2f6318;
}
.verdict-box .big { font-size: 19px; font-weight: 700; }
.verdict-box .sub { font-size: 13px; color: #55813c; margin-top: 4px; }

.side-qr { text-align: center; }
.side-qr .qr-canvas-box {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.side-qr .qr-canvas-box img, .side-qr .qr-canvas-box canvas { display: block; }
.side-qr .url { font-size: 12px; color: var(--muted); word-break: break-all; margin-top: 10px; }
.side-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.side-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: none; }
.side-list .k { color: var(--muted); }
.side-list .v { font-weight: 600; }

.thumb { border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.stamp-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ---------- 查询空状态 ---------- */
/* 核验结果（只显示报告是否存在） */
.report-grid.verify { align-items: stretch; }
.report-grid.verify > div:first-child > .panel { height: 100%; margin-bottom: 0; }
.report-grid.verify > div:first-child > .panel > .panel-body {
  height: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center;
}
.verify-result { text-align: center; padding: 46px 20px 40px; }
.verify-result .icon {
  width: 66px; height: 66px; line-height: 66px; border-radius: 50%;
  margin: 0 auto 18px; font-size: 34px; color: #fff; font-weight: 700;
}
.verify-result.ok .icon { background: #1a9c4b; }
.verify-result.no .icon { background: var(--red); }
.verify-result .title { font-size: 27px; font-weight: 700; color: var(--blue-d); letter-spacing: 1px; }
.verify-result .no {
  margin-top: 12px; font-family: Consolas, "Courier New", monospace;
  font-size: 17px; color: var(--muted); letter-spacing: 1px;
}

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 54px; margin-bottom: 10px; }
.empty-state h3 { color: var(--blue-d); }
.empty-state p { color: var(--muted); }

/* ---------- 表单 / 后台 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 79, 158, .08); }
.field .hint { font-size: 12px; color: var(--muted); }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.qr-result { text-align: center; }
.qr-result .qr-canvas-box {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.qr-result .meta { font-size: 13px; color: var(--muted); margin-top: 12px; word-break: break-all; }

.alert { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.alert-info { background: var(--blue-l); color: var(--blue-d); border: 1px solid #c9dffa; }
.alert-warn { background: #fff8e6; color: #8a5a00; border: 1px solid #f2e0b0; }
.alert-ok { background: #f1f9ec; color: #3d7c1f; border: 1px solid #cfe6c0; }
.alert-err { background: #fdecef; color: var(--red); border: 1px solid #f5c6cd; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 18px 42px; counter-increment: s; }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 26px;
}
.steps li b { color: var(--blue-d); }

.gate {
  max-width: 380px;
  margin: 70px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 30px 28px;
  text-align: center;
}
.gate h2 { color: var(--blue-d); font-size: 20px; }
.gate p { color: var(--muted); font-size: 13px; line-height: 1.7; }

/* 维护入口登录门 */
.gate { max-width: 400px; }
.auth-tabs { display: flex; gap: 6px; margin: 20px 0 16px; background: #f1f5fa; padding: 4px; border-radius: 9px; }
.auth-tab {
  flex: 1; border: none; background: transparent; padding: 8px 4px; font-size: 13px;
  color: var(--muted); font-family: inherit; border-radius: 7px; cursor: pointer;
}
.auth-tab.active { background: #fff; color: var(--blue-d); font-weight: 700; box-shadow: 0 1px 4px rgba(7, 58, 117, .12); }
.auth-pane { text-align: left; display: flex; flex-direction: column; gap: 10px; }
.auth-pane .btn { margin-top: 4px; }
.auth-pane .hint { text-align: center; margin: 0; }
.auth-pane .hint a { color: var(--blue); }
.field.inline { flex-direction: row; gap: 8px; align-items: center; }
.field.inline input { flex: 1; min-width: 0; }
.field.inline .btn { margin-top: 0; white-space: nowrap; }
.gate-msg { min-height: 20px; margin-top: 14px; text-align: left; }
.gate-msg .alert { margin: 0; font-size: 13px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0a2d55; color: #b9cde3; padding: 44px 0 0; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 34px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer li.minor { margin-top: 12px; }
.site-footer li.minor a { color: #7d94ab; font-size: 12px; }
.site-footer li.minor a:hover { color: #b9cde3; }
.site-footer a { color: #b9cde3; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .copyright {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 16px 0;
  font-size: 13px;
  color: #8fa9c6;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 响应式（移动端） ---------- */
@media (max-width: 980px) {
  .report-grid, .tool-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { font-size: 12px; }
  .topbar .hide-sm { display: none; }
  .site-header .wrap { height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .brand img { height: 32px; }
  .brand .site-name { font-size: 15px; }
  .brand .site-sub { display: none; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .hero { padding: 34px 0 40px; }
  .hero h1 { font-size: 25px; }
  .hero .lead { font-size: 14px; }
  .search-panel { padding: 16px; }
  .search-form { flex-direction: column; }
  .btn { width: 100%; }
  .search-form .btn { width: 100%; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 22px; }
  .trust-bar .wrap { gap: 16px; }
  .trust-bar img.cn { height: 34px; }
  .trust-bar img.ma { height: 42px; }
  .trust-bar .trust-text { border-left: none; padding-left: 0; font-size: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 18px 12px; }
  .stat .num { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .report-head h1 { font-size: 21px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 22px; }
  .panel .panel-body { padding: 16px; }
  table.data th, table.data td { padding: 9px 10px; font-size: 13px; }
}

/* ---------- 首页紧凑排版（区块少，收紧留白） ---------- */
body[data-page="home"] .hero { padding: 58px 0 66px; }
body[data-page="home"] .hero h1 { font-size: 36px; }
body[data-page="home"] .section { padding: 46px 0; }
body[data-page="home"] .section-head { margin-bottom: 28px; }
body[data-page="home"] .section-head h2 { font-size: 26px; }
body[data-page="home"] .card-grid { gap: 22px; }

@media print {
  .site-header, .topbar, .site-footer, .side-qr, .no-print { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border-color: #ccc; }
}

/* 报告编号自定义 + 重复校验 */
.no-check-row{display:flex;gap:10px;align-items:center;margin-top:8px;flex-wrap:wrap}
.no-dup{font-size:13px;font-weight:600}
.no-dup.checking{color:#5c6f83}
.no-dup.ok{color:#3d7c1f}
.no-dup.dup{color:#c8102e}
.no-dup.checkerr{color:#c8102e}
