@charset "utf-8";
/* ==========================================================================
   溯源编号查询系统 · 基础样式
   仅服务 index.html（查询首页）与 search.html（查询结果页）
   ========================================================================== */

:root {
  --qb-blue: #0a63f5;
  --qb-blue-2: #2a5ce8;
  --qb-blue-deep: #1450c8;
  --qb-bg: #e7f5fe;
  --qb-line: #d5e3f2;
  --qb-ink: #17222e;
  --qb-sub: #5d7080;
  --qb-card: #ffffff;
  --qb-danger: #d9483b;
  --qb-radius: 10px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.qpage {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--qb-bg);
  color: var(--qb-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { border: 0; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
input, button { font-family: inherit; }

/* ---------- 顶部蓝色标题条 ---------- */
.qbar {
  background: linear-gradient(96deg, var(--qb-blue) 0%, var(--qb-blue-2) 100%);
  color: #fff;
}

.qbar-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px;
}

.qbar-title {
  margin: 0;
  padding: 15px 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* ---------- 顶部面包屑 ---------- */
.qbar-crumb .qbar-inner { padding-top: 13px; padding-bottom: 13px; }

.qcrumb {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.qcrumb a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.qcrumb a:hover { border-bottom-color: #fff; }

.qcrumb-sep {
  margin: 0 7px;
  opacity: 0.75;
}

.qcrumb-now { color: #fff; }

/* ---------- 主体 ---------- */
.qmain { flex: 1 0 auto; }

.qwrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 查询表单（首页） ---------- */
.qform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 58px 0 40px;
}

.qform-label {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #101c28;
}

.qinput {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--qb-ink);
  background: #fff;
  border: 1px solid #c6d5e7;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

.qinput::placeholder {
  color: #9aabbd;
  letter-spacing: 0.5px;
}

.qinput:focus {
  border-color: var(--qb-blue);
  box-shadow: 0 0 0 3px rgba(10, 99, 245, 0.13);
}

.qinput.is-error {
  border-color: var(--qb-danger);
  box-shadow: 0 0 0 3px rgba(217, 72, 59, 0.12);
}

.qtip {
  margin-top: 10px;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--qb-danger);
  text-align: center;
}

.qbtns {
  display: flex;
  gap: 26px;
  margin-top: 26px;
}

.qbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 44px;
  padding: 0 22px;
  font-size: 16px;
  color: #22303f;
  background: #fff;
  border: 1px solid #c2d0e0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

.qbtn:hover {
  color: var(--qb-blue);
  border-color: var(--qb-blue);
  background: #f4f9ff;
}

.qbtn:focus-visible {
  outline: none;
  border-color: var(--qb-blue);
  box-shadow: 0 0 0 3px rgba(10, 99, 245, 0.16);
}

.qbtn:active { transform: translateY(1px); }

.qbtn-block { min-width: 168px; }

/* ---------- 底部说明 ---------- */
.qfoot {
  flex: 0 0 auto;
  margin-top: auto;
  background: linear-gradient(96deg, var(--qb-blue) 0%, var(--qb-blue-2) 100%);
  color: #fff;
}

.qfoot .qbar-inner {
  padding-top: 15px;
  padding-bottom: 15px;
}

.qfoot p {
  font-size: 12.5px;
  line-height: 1.95;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.95);
}

/* ---------- 结果页 ---------- */
.qresult,
.qstate {
  margin: 18px 0 28px;
  padding: 6px 16px 22px;
  background: var(--qb-card);
  border: 1px solid var(--qb-line);
  border-radius: var(--qb-radius);
  box-shadow: 0 2px 12px rgba(16, 58, 120, 0.05);
}

.qresult-title {
  margin: 20px 0 6px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: #16202c;
}

.qresult-code {
  margin: 0 0 20px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  color: var(--qb-blue-deep);
  word-break: break-all;
}

/* 信息表格 */
.qtable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
}

.qtable th,
.qtable td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--qb-line);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.qtable-caption {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #33465c;
  background: #eef4fb;
  letter-spacing: 0.3px;
}

.qtable tbody th {
  width: 68px;
  font-weight: 600;
  color: #33465c;
  background: #fafcff;
  white-space: nowrap;
}

/* 图片 */
.qfigure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--qb-line);
  border-top: none;
}

.qfigure img {
  display: block;
  width: 100%;
  height: auto;
}

.qfigure figcaption {
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--qb-sub);
  text-align: center;
  background: #fbfdff;
  border-top: 1px solid var(--qb-line);
}

/* 再次查询 */
.qagain {
  margin: 22px 0 4px;
  font-size: 14px;
  text-align: center;
}

.qagain a {
  color: var(--qb-blue);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(10, 99, 245, 0.35);
}

.qagain a:hover { border-bottom-color: var(--qb-blue); }

/* 空态 / 未查询到 */
.qstate {
  padding: 40px 22px 34px;
  text-align: center;
}

.qstate-icon {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 4px;
  color: #a7c1e0;
}

.qstate-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.qstate-text {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--qb-sub);
}

/* ---------- 窄屏：表格改为「标签 + 值」两列键值行 ---------- */
@media (max-width: 639px) {
  .qtable {
    display: block;
    border: 1px solid var(--qb-line);
  }

  .qtable thead,
  .qtable tbody,
  .qtable tr {
    display: block;
  }

  .qtable th,
  .qtable td {
    display: block;
    border: 0;
    padding: 10px 12px;
    font-size: 13.5px;
  }

  .qtable-caption {
    display: block;
    border-bottom: 1px solid var(--qb-line);
  }

  .qtable tbody tr {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: stretch;
  }

  .qtable tbody tr + tr {
    border-top: 1px solid var(--qb-line);
  }

  .qtable tbody th {
    width: auto;
    background: #fafcff;
    border-right: 1px solid var(--qb-line);
  }

  .qtable tbody th:nth-of-type(2),
  .qtable tbody td:nth-of-type(2) {
    border-top: 1px solid var(--qb-line);
  }
}

/* ---------- 大屏微调 ---------- */
@media (min-width: 760px) {
  .qbar-title { font-size: 21px; padding: 17px 0; }
  .qform { padding: 92px 0 56px; }
  .qform-label { font-size: 21px; margin-bottom: 20px; }
  .qinput { max-width: 400px; height: 50px; font-size: 16px; }
  .qbtns { gap: 34px; margin-top: 30px; }
  .qbtn { min-width: 108px; height: 46px; font-size: 16px; }
  .qresult, .qstate { margin: 24px 0 36px; padding: 8px 24px 26px; }
  .qresult-title { font-size: 18px; margin-top: 22px; }
  .qresult-code { font-size: 22px; }
  .qtable { font-size: 15px; }
  .qtable th, .qtable td { padding: 13px 14px; }
  .qtable tbody th { width: 84px; }
  .qfigure { padding: 0; text-align: center; }
  .qfigure img { width: auto; max-width: 100%; max-height: 600px; margin: 0 auto; display: inline-block; }
  .qfoot p { font-size: 13px; }
}

/* ---------- 小屏（360px 及以下）---------- */
@media (max-width: 360px) {
  .qform { padding-top: 44px; }
  .qform-label { font-size: 18px; }
  .qbtns { gap: 18px; }
  .qbtn { min-width: 84px; padding: 0 16px; }
  .qtable { font-size: 13px; }
  .qtable th, .qtable td { padding: 9px 7px; }
  .qtable tbody th { width: 58px; }
  .qresult-title { font-size: 15.5px; }
  .qresult-code { font-size: 19px; }
}
