:root {
  --header-red: #D0241C;
  --footer-red: #B91C1C;
  --main-red: #E70012;
  --orange: #E7801C;
  --page-bg: #f9f5f5;
  --row-bg: #F5F6F9;
  --line: #E5E5E5;
  --ink: #333;
  --ink-2: #666;
  --ink-3: #999;
  --font: "Noto Sans SC", sans-serif;
  --form-font: "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-width: 320px;
  color: var(--ink); background: var(--page-bg);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
}
a { color: var(--main-red); text-decoration: none; }
h1, h2, h3, h6 { margin: 0; font-weight: normal; }
p { margin: 0 0 6px; }

.w1200 { width: 1200px; margin: 0 auto; }
@media (max-width: 1340px) { .w1200 { width: 90%; } }
@media (max-width: 640px) { .w1200 { width: calc(100% - 30px); } }

.header { padding: 14px 0; background: var(--header-red); }
.header .w1200 { position: relative; display: flex; align-items: center; justify-content: space-between; }
.header .logo a { display: inline-block; }
.header .logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}
@media (max-width: 640px) {
  .header .logo img { max-height: 42px; }
}

.maintenance-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.maintenance-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 72px 20px;
  background:
    radial-gradient(circle at 50% 12%, rgba(183, 24, 31, .08), transparent 34%),
    #f6f7f8;
}
.maintenance-card {
  width: min(680px, 100%);
  padding: 56px 48px;
  text-align: center;
  background: #fff;
  border-top: 4px solid #b7181f;
  box-shadow: 0 18px 54px rgba(31, 35, 41, .09);
}
/* Loading UI Morphing Infinity, MIT License, Bartosz Zagrodzki. */
.maintenance-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  color: #b7181f;
}
.maintenance-icon svg { display: block; width: 100%; height: 100%; }
.maintenance-kicker {
  margin: 0 0 12px;
  color: #b7181f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}
.maintenance-card h1 {
  margin: 0;
  color: #1f2329;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.3;
}
.maintenance-copy {
  margin: 22px 0 8px;
  color: #4e5969;
  font-size: 17px;
  line-height: 1.8;
}
.maintenance-note {
  margin: 0;
  color: #86909c;
  font-size: 14px;
}
@media (max-width: 640px) {
  .maintenance-page { padding: 40px 16px; }
  .maintenance-card { padding: 40px 22px; }
  .maintenance-copy { font-size: 15px; }
}
.public-nav-toggle { display: none; border: 0; padding: 8px; color: #fff; background: transparent; cursor: pointer; }
.public-nav-toggle span { display: block; width: 24px; height: 2px; margin: 4px 0; background: currentColor; }
.public-nav-drawer { display: block; }
.public-nav-drawer[hidden] { display: none; }
@media (max-width: 640px) {
  .public-nav-toggle { display: block; }
  .public-nav-drawer { position: fixed; top: 70px; right: 0; bottom: 0; left: 0; z-index: 40; overflow: auto; padding: 8px 15px 14px; background: linear-gradient(to bottom, #fff 0, #fff 128px, rgba(0,0,0,.45) 128px, rgba(0,0,0,.45) 100%); box-shadow: 0 3px 12px rgba(0,0,0,.12); }
  .public-nav-drawer[hidden] { display: none; }
  .public-nav-drawer a { display: block; padding: 12px 4px; color: var(--ink); font-size: 17px; border-bottom: 1px solid #f0e6e6; }
  .public-nav-drawer a:last-child { border-bottom: 0; }
  .public-nav-drawer a:active { color: var(--main-red); }
  body.public-nav-open { overflow: hidden; }
}

.page_content {
  margin: 20px auto;
  min-height: calc(100vh - 250px);
  background: #fff;
  overflow: hidden;
}
@media (max-width: 640px) { .page_content { min-height: calc(100vh - 218px); } }

.certificate_section { margin: 35px auto 0; }
.certificate_section { line-height: normal; }
.certificate_title { text-align: center; }
.certificate_title h6 { font-size: 24px; color: var(--ink); }
.certificate_title p { font-size: 14px; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 640px) {
  .certificate_section { margin-top: 20px; }
  .certificate_title h6 { font-size: 18px; }
}

.certificate_form { margin: 24px auto 0; width: min(600px, calc(100% - 32px)); overflow: hidden; }
.form_group { margin-bottom: 20px; width: 100%; overflow: hidden; }
.item_tit {
  float: left; width: 110px;
  font-size: 16px; color: var(--ink); text-align: right; line-height: 40px;
}
.item_tit span { margin-right: 5px; color: #EF0F0F; }
.item_cont { margin-left: 110px; overflow: hidden; }
.item_cont select,
.item_cont input {
  padding-left: 10px; width: 100%; height: 40px;
  font-size: 14px; color: var(--ink-2);
  border-radius: 3px; border: 1px solid var(--line);
  font-family: var(--form-font); background: #fff; outline: none;
}
.item_cont input::placeholder {
  color: #C0C4CC;
  font-family: var(--form-font);
  opacity: 1;
}
.item_cont input:focus, .item_cont select:focus { border-color: var(--main-red); }
.item_cont select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") 96% center no-repeat;
}
.item_cont select:invalid { color: #C0C4CC; }
.item_cont select option { color: var(--ink-2); }
.item_cont input.yzm_inp { float: left; width: calc(100% - 120px); }
.img_box {
  float: left;
  display: flex; align-items: center; justify-content: center;
  width: 120px; height: 50px; overflow: hidden; cursor: pointer;
}
.img_box img { width: 120px; height: 50px; }

.btn1, .btn2 {
  display: block; margin: 10px auto 0;
  width: 150px; height: 36px;
  font-size: 16px; color: #fff; border: 0; border-radius: 5px;
  cursor: pointer; font-family: var(--form-font);
}
.btn1 { background: var(--main-red); }
.btn1:hover { background: #c40a1a; }
.btn2 { background: var(--orange); }
.btn2:hover { background: #c46d17; }
.form_actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 12px; overflow: visible; }
.form_actions .btn1, .form_actions .btn2 { margin: 0; }
@media (max-width: 640px) {
  .certificate_form { margin-top: 22px; padding: 0; width: calc(100% - 32px); }
  .form_group { margin-bottom: 20px; }
  .item_tit { float: none; margin-bottom: 7px; width: 100%; font-size: 14px; text-align: left; line-height: 20px; }
  .item_cont { margin-left: 0; }
  .item_cont select, .item_cont input { height: 38px; line-height: 38px; }
  .item_cont input.yzm_inp { width: calc(100% - 120px); }
  .img_box, .img_box img { height: 38px; }
  .form_actions { gap: 16px; margin-top: 16px; }
  .btn1, .btn2 { width: min(220px, 100%); height: 38px; font-size: 14px; margin-top: 0; }
}

.msg { text-align: center; font-size: 14px; margin: 10px 0; min-height: 20px; color: var(--main-red); }
.msg:empty { display: none; }

.result_head {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px;
  margin: 32px auto 0; padding: 11px 24px; width: max-content; max-width: calc(100% - 32px);
  color: #fff; background: var(--main-red); border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: .04em; line-height: 1.2;
  box-shadow: 0 6px 18px rgba(231, 0, 18, .28);
  scroll-margin-top: 16px;
}
.result_head[hidden] { display: none; }
.result_head_count {
  padding: 2px 11px; color: #fff; background: rgba(255, 255, 255, .22);
  border-radius: 999px; font-size: 15px; font-weight: 600;
}
.result_head_tip { font-size: 13px; font-weight: 400; opacity: .92; }
.result_head.is-empty { background: #6b7280; box-shadow: 0 6px 18px rgba(107, 114, 128, .26); }
.result_head.is-empty .result_head_count { display: none; }
@keyframes result-head-flash {
  0%   { transform: scale(1);    box-shadow: 0 6px 18px rgba(231, 0, 18, .28); }
  35%  { transform: scale(1.07); box-shadow: 0 0 0 9px rgba(231, 0, 18, .14), 0 8px 22px rgba(231, 0, 18, .38); }
  100% { transform: scale(1);    box-shadow: 0 6px 18px rgba(231, 0, 18, .28); }
}
.result_head.is-flash { animation: result-head-flash 1s ease-out 2; }
@media (prefers-reduced-motion: reduce) {
  .result_head.is-flash { animation: none; }
}
@media (max-width: 640px) {
  .result_head { margin-top: 22px; padding: 10px 18px; font-size: 15px; }
  .result_head_count { font-size: 14px; }
}

.result_table {
  margin: 14px auto 30px; width: 1000px; overflow: hidden;
  background: #fff; border-radius: 6px; box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}
.result_table table { width: 100%; border-collapse: collapse; }
.result_table thead th {
  padding: 10px 15px; font-size: 16px; color: #fff;
  text-align: left; background: var(--main-red); border-bottom: 2px solid #fff;
  white-space: nowrap; font-weight: normal;
}
.result_table tbody td {
  padding: 10px 15px; font-size: 16px; color: var(--ink); background: var(--row-bg);
}
.result_table thead th:first-child,
.result_table tbody td:first-child { padding-left: 30px; }
.result_table tbody tr:hover td { background: #eceef4; }
.result_table td a.detail-link { color: var(--main-red); }
.result_table td .st-revoked { color: var(--main-red); }
.result_table td .st-badge-pending {
  padding: 0; border: 0; background: none; font: inherit; cursor: pointer;
  color: #8c6528; text-decoration: underline;
}
@media (max-width: 1340px) {
  .result_table { width: 95%; overflow-x: auto; }
  .result_table thead th, .result_table tbody td { padding: 10px; }
}
@media (max-width: 768px) {
  .result_table thead th, .result_table tbody td { font-size: 14px; }
}
@media (max-width: 640px) {
  .result_table { margin-top: 10px; width: 90%; overflow-x: auto; }
  .result_table thead th, .result_table tbody td { padding: 5px 10px; }
  .result_table tbody td:first-child { white-space: nowrap; }
}

.no_data_box { margin: 30px 0; text-align: center; overflow: hidden; }
.no_data_box p { margin-top: 10px; font-size: 16px; color: var(--ink-3); line-height: 20px; }
@media (max-width: 640px) {
  .no_data_box { margin: 15px 0; padding: 0 15px; }
  .no_data_box img { max-width: 35%; }
  .no_data_box p { font-size: 14px; }
}

.resultbtn_section { margin-bottom: 30px; width: 100%; text-align: center; }
.resultbtn_section a, .resultbtn_section button {
  display: inline-block; margin: 0 8px; width: 90px; height: 33px;
  font-size: 14px; color: var(--main-red); text-align: center; line-height: 31px;
  background: #fff; border-radius: 5px; border: 1px solid var(--main-red);
  cursor: pointer; font-family: inherit;
}
.resultbtn_section a:hover, .resultbtn_section button:hover { color: #fff; background: var(--main-red); text-decoration: none; }
@media (max-width: 768px) { .resultbtn_section .print_btn { display: none; } }

.pop_layer {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
.pop_layer.show { display: flex; }
.pop_panel { width: 800px; max-width: calc(100% - 30px); background: #fff; }
.pop_panel.is-narrow { width: 460px; }
.pop_panel_head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 50px; background: var(--header-red);
}
.pop_panel_head h6 { font-size: 18px; color: #fff; }
.pop_panel_head .close {
  border: 0; background: transparent; color: #fff;
  font-size: 24px; cursor: pointer; line-height: 1; padding: 4px 8px;
}
.pop_panel_body {
  padding: 20px 30px; max-height: calc(100vh - 160px); overflow-y: auto;
  font-size: 16px; color: var(--ink); line-height: 30px;
}
.pop_panel_body strong { font-weight: 700; }

/* 标识认证提示：查询命中即弹，比横向滑到「操作」列再点浅一层 */
.badge-pop-text { margin: 0; font-size: 16px; line-height: 1.7; }
.badge-pop-contact {
  margin-top: 16px; padding: 16px 14px; text-align: center;
  background: #fafafa; border: 1px solid #e5e5e5;
}
.badge-pop-contact p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.badge-pop-contact img { display: block; width: min(220px, 100%); margin: 0 auto; }
.badge-pop-action { margin: 18px 0 0; text-align: center; }
.badge-pop-action .btn1 { margin: 0 auto; }

.footer { padding: 18px 0; background: var(--footer-red); overflow: hidden; }
.footer p { font-size: 14px; color: #fff; line-height: 28px; text-align: center; margin: 0; }
.footer a { color: #fff; }
@media (max-width: 640px) { .footer { padding: 15px 10px; } .footer p { font-size: 12px; line-height: 1.8; } }

.cert-detail-page {
  position: relative;
  background: #fff;
}
.cert-detail-page::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: var(--header-red);
}
.cert-page { padding: 38px 40px 48px; }
.cert-head { text-align: center; margin: 0 auto 30px; max-width: 720px; }
.cert-head h1 { margin-top: 12px; font-size: 28px; line-height: 1.3; color: #222; font-weight: 600; letter-spacing: .05em; }
.cert-head .status-line { font-size: 14px; margin-top: 8px; }
.cert-head-note { margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.cert-head-action { margin-top: 18px; }
.cert-verify-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border: 1px solid #9bc9ad; border-radius: 3px;
  color: #08723c; background: #f7fbf8; font-size: 13px; font-weight: 600;
}
.cert-verify-badge svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cert-verify-badge.is-revoked { color: #b42318; background: #fff4f3; border-color: #ffc9c5; }
.cert-verify-icon { display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 800; }
.status-ok { color: #647067; }
.status-revoked { color: var(--main-red); }
.cert-layout {
  display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(320px, .9fr);
  gap: 24px; align-items: start; max-width: 1080px; margin: 0 auto;
}
@media (max-width: 860px) { .cert-layout { grid-template-columns: 1fr; } }
.cert-frame {
  position: relative; padding: 10px; border: 1px solid #d9d9d9; border-radius: 2px;
  background: #fff;
}
.cert-frame::after { display: none; }
.cert-frame img { position: relative; z-index: 1; width: 100%; height: auto; display: block; border-radius: 0; }
.cert-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cert-actions a {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 18px; border-radius: 3px;
  font-size: 14px; font-weight: 500; transition: background .18s ease, border-color .18s ease;
}
.cert-actions a:hover { text-decoration: none; }
.cert-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cert-action-primary { color: #fff; background: var(--header-red); border: 1px solid var(--header-red); }
.cert-action-primary:hover { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.cert-action-secondary { color: #8f1f1a; background: #fff; border: 1px solid #c9a5a2; }
.cert-action-secondary:hover { color: #fff; border-color: var(--header-red); background: var(--header-red); }
.cert-panel { display: flex; flex-direction: column; gap: 16px; }
.panel-card {
  border: 1px solid #ddd; border-radius: 2px; padding: 18px;
  background: #fff;
}
.panel-card-title { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #e5e5e5; }
.panel-card-title h3 { padding-left: 10px; border-left: 3px solid var(--header-red); font-size: 16px; color: #222; font-weight: 600; line-height: 1.25; margin: 0; }
.meta { display: grid; grid-template-columns: 84px 1fr; font-size: 14px; }
.meta dt, .meta dd { padding: 9px 0; border-bottom: 1px solid #f2edeb; }
.meta dt { color: #99908e; }
.meta dd { margin: 0; color: #332b29; overflow-wrap: anywhere; }
.meta dt:nth-last-of-type(1), .meta dd:last-child { border-bottom: 0; }
.meta-emphasis { color: #211817 !important; font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-image-wrap { padding: 7px; border: 1px solid #ddd; border-radius: 2px; background: #fff; }
.qr-box img { display: block; width: 160px; height: 160px; }
.qr-box .cap { font-size: 12px; color: #938987; text-align: center; }
.link-copy { display: flex; gap: 8px; margin-top: 12px; }
.link-copy input {
  flex: 1; min-width: 0; padding: 9px 11px; font-size: 12px; font-family: inherit;
  border: 1px solid #d9d9d9; border-radius: 2px; outline: none;
  color: var(--ink-2); background: #fafafa;
}
.link-copy input:focus { border-color: #dca9a4; box-shadow: 0 0 0 3px rgba(208,36,28,.07); }
.link-copy .btn { white-space: nowrap; border-radius: 2px; }
.cert-notice-card { display: flex; gap: 11px; padding: 14px 16px; background: #fafafa; border-color: #ddd; border-left: 3px solid #b58a43; box-shadow: none; }
.notice-icon { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; border: 1px solid #b58a43; border-radius: 50%; color: #8c6528; background: transparent; font-size: 11px; font-weight: 700; }
.notice { margin: 0; font-size: 12.5px; color: #666; line-height: 1.75; }
.pill-revoked { color: var(--main-red); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-outline {
  display: inline-block; border: 1px solid var(--main-red); color: var(--main-red);
  background: #fff; border-radius: 5px; font-family: inherit; cursor: pointer;
}
.btn-outline:hover { color: #fff; background: var(--main-red); text-decoration: none; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }

@media (max-width: 860px) {
  .cert-page { padding: 30px 24px 38px; }
  .cert-layout { max-width: 640px; }
}
@media (max-width: 640px) {
  .cert-detail-page { width: 100%; margin: 0; }
  .cert-page { padding: 26px 15px 32px; }
  .cert-head { margin-bottom: 22px; }
  .cert-head h1 { font-size: 25px; }
  .cert-head .status-line { padding: 0 8px; font-size: 13px; line-height: 1.7; }
  .cert-frame { padding: 7px; border-radius: 2px; }
  .cert-frame img { border-radius: 0; }
  .cert-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cert-actions a { width: 100%; min-height: 44px; padding: 9px 12px; }
  .panel-card { padding: 16px 15px; border-radius: 2px; }
  .meta { grid-template-columns: 76px minmax(0, 1fr); font-size: 13px; }
  .meta dt, .meta dd { padding: 8px 0; }
  .link-copy { flex-direction: column; }
  .link-copy .btn { width: 100%; min-height: 40px; }
  .cert-notice-card { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media print {
  .header, .footer, .certificate_form, .cert-actions, .resultbtn_section { display: none !important; }
  .page_content { margin: 0; }
  .cert-layout { display: block; }
}
