/* 前台样式 - 响应式 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.topbar {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: #0b3d91;
  letter-spacing: 1px;
}
.brand-sub {
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: 2px;
}
.topnav {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.topnav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
.topnav a:hover { color: #1e6fff; background: #f0f5ff; }
.topnav a.active { color: #1e6fff; font-weight: 600; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0b3d91 0%, #1e6fff 100%);
  color: #fff;
  padding: 48px 0 64px;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; }
.hero-sub { margin: 0 0 24px; opacity: .85; font-size: 15px; }
.searchbox {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  max-width: 720px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 16px 20px;
  font-size: 15px;
  outline: none;
}
.searchbox button {
  border: 0;
  background: #ff6a00;
  color: #fff;
  padding: 0 36px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
}
.searchbox button:hover { background: #e55f00; }

/* ===== 内容区 ===== */
.content { margin-top: -32px; padding-bottom: 60px; }
.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(15,40,80,.06);
  margin-bottom: 18px;
}
.result-count { color: #6b7280; font-size: 13px; margin: 0 0 12px; }

.member-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.m-company { font-size: 19px; font-weight: 700; color: #111827; word-break: break-all; }
.m-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; }
.badge { color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.m-no { color: #4b5563; word-break: break-all; }
.tag-ok { color: #16a34a; }
.tag-off { color: #dc2626; }

.member-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #e5e7eb;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.info-row span { color: #6b7280; flex-shrink: 0; }
.info-row b { text-align: right; word-break: break-all; }

.m-cert { text-align: center; }
.cert-img-link img {
  max-width: 100%;
  max-height: 420px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.cert-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  color: #1e6fff;
  text-decoration: none;
}
.pdf-icon {
  width: 64px; height: 64px;
  border-radius: 8px;
  background: #dc2626; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.cert-empty { color: #9ca3af; padding: 40px; background: #f9fafb; border-radius: 6px; }

/* 未找到 */
.notfound { text-align: center; padding: 48px 24px; }
.nf-icon {
  width: 56px; height: 56px; line-height: 56px; border-radius: 50%;
  background: #fef2f2; color: #dc2626; font-size: 28px; margin: 0 auto 12px;
}
.notfound h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: #9ca3af; font-size: 13px; }

.howto ul { padding-left: 20px; color: #4b5563; margin: 8px 0; }
.howto li { margin: 6px 0; }

.footer {
  text-align: center;
  padding: 24px 16px;
  color: #9ca3af;
  font-size: 13px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

/* ===== 平板 ===== */
@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero h1 { font-size: 26px; }
  .member-body { grid-template-columns: 1fr; gap: 20px; }
  .info-row { font-size: 13px; }
}

/* ===== 手机 ===== */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }

  .topbar-inner { height: 52px; gap: 10px; }
  .brand-sub { display: none; }
  .logo { font-size: 17px; letter-spacing: 0; }
  .topnav a { font-size: 13px; padding: 4px 8px; white-space: nowrap; }

  .hero { padding: 28px 0 44px; }
  .hero h1 { font-size: 22px; }
  .hero-sub { font-size: 13px; margin-bottom: 18px; }

  .searchbox { flex-direction: column; border-radius: 10px; }
  .searchbox input { padding: 14px 16px; font-size: 14px; }
  .searchbox button { padding: 13px; font-size: 15px; }

  .content { margin-top: -24px; }
  .card { padding: 16px; border-radius: 8px; }
  .m-company { font-size: 16px; }
  .member-head { flex-direction: column; }
  .m-meta { font-size: 12px; gap: 6px 10px; }

  .member-body { gap: 16px; margin-top: 16px; padding-top: 16px; }
  .cert-img-link img { max-height: none; }
  .cert-pdf { padding: 24px; }

  .notfound { padding: 32px 16px; }
  .footer { font-size: 12px; padding: 18px 12px; }
}
