/* ==========================================================================
   叶子环保 · 防伪查询页
   ========================================================================== */

:root {
  --teal: #1fa1a0;
  --teal-dark: #17827f;
  --teal-deep: #0d5c5a;
  --teal-soft: #e8f6f5;
  --ink: #172b2a;
  --ink-2: #3d5654;
  --muted: #7b918f;
  --line: #e2ecea;
  --bg: #f4f8f7;
  --white: #fff;
  --ok: #1fa1a0;
  --warn: #c9821c;
  --warn-soft: #fdf5e7;
  --err: #c9473d;
  --err-soft: #fcefee;
  --shadow-sm: 0 2px 10px rgba(13, 92, 90, .06);
  --shadow-md: 0 14px 40px rgba(13, 92, 90, .10);
  --shadow-lg: 0 26px 70px rgba(13, 92, 90, .14);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
svg { width: 100%; height: 100%; fill: currentColor; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------- 顶部导航 ------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 78px;
}

.brand img { height: 46px; width: auto; }

.head-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 15px;
  color: var(--ink-2);
}

.head-nav a { position: relative; padding: 6px 0; transition: color .2s; }
.head-nav a:hover { color: var(--teal); }
.head-nav a.on { color: var(--teal); font-weight: 600; }
.head-nav a.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.head-tel {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.head-tel .tel-label { font-size: 12px; color: var(--muted); }
.head-tel strong {
  font-size: 20px;
  color: var(--teal);
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------- 首屏 --------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1fa1a0 0%, #14807f 58%, #0d5c5a 100%);
  color: #fff;
  padding: 62px 0 118px;
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  background: rgba(255, 255, 255, .07);
}
.hero-bg .b1 { width: 460px; height: 460px; right: -90px; top: -180px; }
.hero-bg .b2 { width: 300px; height: 300px; left: -80px; bottom: -160px; background: rgba(255, 255, 255, .05); }
.hero-bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 78%);
}

.hero-inner { position: relative; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: 1px;
  font-weight: 700;
}

.hero .sub {
  margin-top: 14px;
  font-size: 16px;
  color: rgba(255, 255, 255, .86);
  max-width: 640px;
}

.hero-tags { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-tags span {
  font-size: 12.5px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  color: rgba(255, 255, 255, .92);
}

/* --------------------------------- 查询卡 -------------------------------- */

.query-card {
  position: relative;
  margin-top: -72px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 8px 40px 34px;
}

.tabs {
  position: relative;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 22px 22px 18px;
  border: 0;
  background: none;
  font-size: 16px;
  color: var(--muted);
  transition: color .2s;
}

.tab svg { width: 19px; height: 19px; }
.tab:hover { color: var(--teal-dark); }
.tab.on { color: var(--teal); font-weight: 600; }

.tab-ink {
  position: absolute;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--teal);
  transition: left .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1);
}

.q-form {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.q-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  border: 1.5px solid #d7e5e3;
  border-radius: 10px;
  background: #fbfdfd;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.q-field:focus-within {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 161, 160, .11);
}

.q-ico {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  color: #9fb3b1;
  pointer-events: none;
}

.q-field input {
  width: 100%;
  height: 62px;
  padding: 0 50px 0 50px;
  border: 0;
  background: none;
  outline: none;
  font-size: 18px;
  letter-spacing: 1.5px;
  color: var(--ink);
  font-family: "SF Mono", "Consolas", "PingFang SC", monospace;
}

.q-field input::placeholder {
  color: #a9bcba;
  font-size: 15px;
  letter-spacing: .5px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.clear-btn {
  position: absolute;
  right: 14px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: #7b918f;
  display: grid;
  place-items: center;
  padding: 5px;
  transition: background .2s;
}
.clear-btn:hover { background: rgba(0, 0, 0, .12); }

.q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 168px;
  height: 62px;
  padding: 0 30px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #22adaa, #17827f);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(23, 130, 127, .28);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.q-btn svg { width: 17px; height: 17px; }
.q-btn:hover { filter: brightness(1.05); box-shadow: 0 12px 26px rgba(23, 130, 127, .34); }
.q-btn:active { transform: translateY(1px); }
.q-btn[disabled] { opacity: .7; cursor: default; }

.q-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .2px;
}

/* --------------------------------- 结果区 -------------------------------- */

.result { margin-top: 6px; }
.result:empty { margin-top: 0; }

.res-card {
  scroll-margin-top: 92px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  animation: rise .38s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.res-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: linear-gradient(90deg, var(--teal-soft), #f7fcfb);
  border-bottom: 1px solid #dcefed;
}

.res-badge {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(31, 161, 160, .3);
}
.res-badge svg { width: 22px; height: 22px; }

.res-top h3 { font-size: 18px; line-height: 1.4; }
.res-top p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

.res-body { padding: 22px 24px; }

.agent-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}

.avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2bb3b1, #17827f);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.agent-txt .line1 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.agent-txt .line2 {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
  font-family: "SF Mono", Consolas, monospace;
  letter-spacing: .8px;
}

.tag {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 5px;
  line-height: 1.6;
  letter-spacing: .3px;
}
.tag.ok { color: #0f7b78; background: rgba(31, 161, 160, .12); }
.tag.off { color: var(--err); background: var(--err-soft); }
.tag.warn { color: var(--warn); background: var(--warn-soft); }

.kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 20px;
}

.kv > div {
  min-width: 0;
}

.kv dt {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .4px;
  margin-bottom: 4px;
}

.kv dd {
  font-size: 15px;
  color: var(--ink);
  word-break: break-all;
}

.kv dd.mono {
  font-family: "SF Mono", Consolas, monospace;
  letter-spacing: .8px;
  font-size: 14px;
}

.kv dd.strong { font-weight: 600; }

.res-foot {
  margin-top: 20px;
  padding: 12px 16px;
  background: #f7faf9;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* 未绑定 / 作废 变体 */
.res-card.warn .res-top { background: linear-gradient(90deg, #fdf6e9, #fffdf8); border-bottom-color: #f5e7c8; }
.res-card.warn .res-badge { background: var(--warn); box-shadow: 0 6px 14px rgba(201, 130, 28, .28); }
.res-card.err .res-top { background: linear-gradient(90deg, var(--err-soft), #fffafa); border-bottom-color: #f7dcd9; }
.res-card.err .res-badge { background: var(--err); box-shadow: 0 6px 14px rgba(201, 71, 61, .26); }

.prod-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.code-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 1.4px;
}

.pending-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: #8a5b12;
  font-size: 13.5px;
  line-height: 1.7;
}
.pending-note svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }

/* 加载 / 空态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(31, 161, 160, .25);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  margin-top: 26px;
  padding: 26px;
  border: 1px dashed #d7e5e3;
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: #fbfdfd;
}

/* --------------------------------- 说明区 -------------------------------- */

.help { margin-top: 66px; }

.help-head h2 {
  font-size: 26px;
  letter-spacing: .5px;
}

.help-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 26px 24px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s;
}
.steps li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.step-no {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 2px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(31, 161, 160, .22);
  margin-bottom: 12px;
}

.steps h3 { font-size: 17px; margin-bottom: 7px; }
.steps p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.steps b {
  font-family: "SF Mono", Consolas, monospace;
  font-weight: 500;
  color: var(--teal-dark);
  letter-spacing: .5px;
}

/* --------------------------------- 提示条 -------------------------------- */

.notice {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 34px;
  margin: 30px 0 70px;
  padding: 32px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.notice-main h2 { font-size: 20px; margin-bottom: 10px; }
.notice-main p { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.notice-tip {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(31, 161, 160, .4);
  color: var(--muted) !important;
  font-size: 12.5px !important;
}

.notice-side {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.qr { text-align: center; }
.qr img {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}
.qr span { display: block; margin-top: 7px; font-size: 11.5px; color: var(--muted); }

.hotline span { display: block; font-size: 12px; color: var(--muted); }
.hotline strong {
  display: block;
  font-size: 18px;
  color: var(--teal);
  letter-spacing: 0;
  margin: 2px 0 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hotline em { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* --------------------------------- 页脚 --------------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 22px 0;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.foot-links { display: flex; gap: 10px; align-items: center; }
.foot-links a:hover { color: var(--teal); }

/* -------------------------------- 响应式 -------------------------------- */

@media (max-width: 960px) {
  .head-nav { display: none; }
  .head-tel { margin-left: auto; padding-left: 0; border-left: 0; }
  .head-tel .tel-label { display: none; }
  .hero { padding: 44px 0 100px; }
  .hero h1 { font-size: 30px; }
  .query-card { padding: 4px 22px 26px; border-radius: 14px; }
  .tab { padding: 18px 14px 15px; font-size: 15px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .notice { grid-template-columns: 1fr; gap: 24px; }
  .notice-side {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 22px;
  }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .head-inner { height: 64px; }
  .brand img { height: 36px; }
  .head-tel strong { font-size: 17px; }
  .hero { padding: 34px 0 92px; }
  .hero h1 { font-size: 24px; }
  .hero .sub { font-size: 14px; }
  .hero-tags { margin-top: 18px; }
  .query-card { margin-top: -60px; padding: 0 16px 22px; }
  .tabs { gap: 0; }
  .tab { flex: 1; justify-content: center; }
  .q-form { flex-direction: column; gap: 10px; margin-top: 20px; }
  .q-field input { height: 54px; font-size: 16px; padding-left: 44px; }
  .q-ico { left: 14px; width: 18px; height: 18px; }
  .q-btn { width: 100%; height: 52px; min-width: 0; }
  .kv { grid-template-columns: 1fr; gap: 14px; }
  .res-body, .res-top { padding-left: 18px; padding-right: 18px; }
  .agent-txt .line1 { font-size: 16px; }
  .notice { padding: 24px 20px; margin-bottom: 40px; }
  .notice-side { flex-direction: column; align-items: flex-start; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}
