/* 查询端样式（H5 + PC 共用） */

:root {
    --navy: #1e3a8a;
    --navy-dark: #12265c;
    --navy-light: #eef2ff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f4f6fb;
    --gold: #b0883a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }

/* ============== H5 ============== */
.h5-page { max-width: 640px; margin: 0 auto; min-height: 100vh; background: #fff; padding-bottom: 30px; }

.h5-hero {
    background: linear-gradient(160deg, var(--navy-dark), #1e3a8a 55%, #2d4fa8);
    color: #fff;
    padding: calc(28px + env(safe-area-inset-top)) 22px 58px;
    position: relative;
    overflow: hidden;
}
.h5-hero::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.h5-hero h1 { font-size: 20px; margin: 0 0 8px; font-weight: 600; letter-spacing: .5px; position: relative; }
.h5-hero p { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .72); line-height: 1.7; position: relative; }

.h5-body { padding: 0 16px; margin-top: -36px; position: relative; }

.search-card {
    background: #fff; border-radius: 16px; padding: 18px 16px 16px;
    box-shadow: 0 8px 28px rgba(18, 38, 92, .12);
}
.search-card .label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }

.input-wrap { position: relative; }
.input-wrap input {
    width: 100%; padding: 12px 14px; border: 1px solid #dfe4ee; border-radius: 10px;
    font-size: 15px; outline: none; background: #fbfcfe; color: var(--text);
}
.input-wrap input:focus { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(30, 58, 138, .08); }

.search-card .field { margin-bottom: 12px; }
.search-card .field label {
    display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px;
}
.search-card .field input {
    width: 100%; padding: 11px 14px; border: 1px solid #dfe4ee; border-radius: 10px;
    font-size: 15px; outline: none; background: #fbfcfe; color: var(--text);
    -webkit-appearance: none; appearance: none;
}
.search-card .field input:focus {
    border-color: var(--navy); background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, .08);
}

.btn-search {
    width: 100%; margin-top: 14px; padding: 12px; border: none; border-radius: 10px;
    background: var(--navy); color: #fff; font-size: 15px; font-weight: 500; cursor: pointer;
    transition: opacity .15s;
}
.btn-search:active { opacity: .85; }
.btn-search:disabled { opacity: .6; }

.captcha-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.captcha-row input { flex: 1; }
.captcha-row img { height: 40px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }

.result-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 12px; }
.result-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.result-head span { font-size: 12px; color: var(--muted); }

.eng-card {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 14px; margin-bottom: 10px;
}
.eng-card .avatar {
    width: 52px; height: 52px; border-radius: 12px; flex: 0 0 52px; overflow: hidden;
    background: var(--navy-light); color: var(--navy);
    display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600;
}
.eng-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.eng-card .info { flex: 1; min-width: 0; }
.eng-card .info .name { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.eng-card .info .unit { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-card .info .code { font-size: 12px; color: #94a3b8; margin-top: 3px; font-family: Consolas, monospace; }
.eng-card .go {
    font-size: 12.5px; color: var(--navy); border: 1px solid #c7d2fe;
    padding: 6px 11px; border-radius: 8px; white-space: nowrap; background: #fff;
}

.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.empty-state svg { width: 52px; height: 52px; opacity: .35; margin-bottom: 12px; }

.load-more {
    display: block; width: 100%; margin-top: 6px; padding: 11px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    color: var(--navy); font-size: 13.5px; cursor: pointer;
}

/* 证书页 */
.cert-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 28px rgba(18, 38, 92, .1); margin-top: -36px; position: relative; }
.cert-top {
    background: linear-gradient(160deg, var(--navy-dark), #2d4fa8);
    color: #fff; padding: 22px 20px 26px; text-align: center;
}
.cert-top .t1 { font-size: 17px; font-weight: 600; letter-spacing: 2px; }
.cert-top .t2 { font-size: 10px; color: rgba(255, 255, 255, .6); letter-spacing: 1.6px; margin-top: 5px; }
.cert-body { padding: 20px; }
.cert-person { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px dashed #e2e8f0; }
.cert-photo {
    width: 86px; height: 112px; border-radius: 10px; background: var(--navy-light);
    display: flex; align-items: center; justify-content: center; color: #9aa6c0; font-size: 12px;
    overflow: hidden; flex: 0 0 86px;
}
.cert-photo img { width: 100%; height: 100%; object-fit: cover; }
.cert-name { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.cert-tag { display: inline-block; padding: 3px 9px; border-radius: 20px; background: #ecfdf5; color: #047857; font-size: 11.5px; }

.cert-rows { padding: 4px 0; }
.cert-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f4f6fa; font-size: 13.5px; }
.cert-row .k { color: var(--muted); flex: 0 0 78px; }
.cert-row .v { color: var(--text); text-align: right; font-weight: 500; word-break: break-all; }

.cert-qr { text-align: center; padding: 20px 0 6px; }
.cert-qr img { width: 128px; height: 128px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.cert-qr .tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

.cert-actions { display: flex; gap: 10px; padding: 8px 20px 22px; }
.cert-actions .btn { flex: 1; text-align: center; padding: 12px; border-radius: 10px; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.cert-actions .primary { background: var(--navy); color: #fff; }
.cert-actions .ghost { background: #fff; border-color: #dfe4ee; color: #374151; }

.cert-foot { text-align: center; font-size: 11.5px; color: #9ca3af; padding: 18px 20px 26px; line-height: 1.8; }

.notice {
    background: #fff8e6; border: 1px solid #fde8b0; color: #92400e;
    border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.8; margin-top: 12px;
}

/* ============== PC ============== */
.pc-page { min-height: 100vh; background: var(--bg); }

.pc-header {
    background: linear-gradient(120deg, var(--navy-dark), #1e3a8a 60%, #2d4fa8);
    color: #fff; padding: 0 0 66px;
}
.pc-header .bar { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 20px 24px; }
.pc-header .logo { display: flex; align-items: center; gap: 12px; }
.pc-header .logo .mark {
    width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .14);
    display: flex; align-items: center; justify-content: center;
}
.pc-header .logo h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .5px; }
.pc-header .logo span { font-size: 10px; color: rgba(255, 255, 255, .55); letter-spacing: 1.4px; display: block; margin-top: 2px; }
.pc-header .contact { font-size: 12.5px; color: rgba(255, 255, 255, .75); }

.pc-search-wrap { max-width: 1080px; margin: -46px auto 0; padding: 0 24px; }
.pc-search {
    background: #fff; border-radius: 16px; padding: 24px;
    box-shadow: 0 12px 40px rgba(18, 38, 92, .1);
}
.pc-search .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.pc-search .field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pc-search input {
    width: 100%; padding: 10px 13px; border: 1px solid #dfe4ee; border-radius: 9px;
    font-size: 14px; outline: none; background: #fbfcfe;
}
.pc-search input:focus { border-color: var(--navy); background: #fff; }
.pc-search .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.btn { padding: 9px 20px; border-radius: 9px; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; border-color: #dfe4ee; color: #374151; }

.pc-main { max-width: 1080px; margin: 0 auto; padding: 26px 24px 60px; }

.pc-table-card { background: #fff; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.pc-table-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pc-table-head h2 { margin: 0; font-size: 15px; }
.pc-table-head span { font-size: 12.5px; color: var(--muted); }

table.pc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.pc-table th { text-align: left; padding: 12px 20px; background: #f8fafc; color: #475569; font-weight: 600; font-size: 13px; }
table.pc-table td { padding: 13px 20px; border-top: 1px solid #f1f3f7; }
table.pc-table tbody tr:hover { background: #fbfcfe; }
table.pc-table .code { font-family: Consolas, monospace; font-size: 12.5px; color: #475569; }
table.pc-table .link { color: var(--navy); cursor: pointer; }

.pc-pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 20px; font-size: 13px; color: var(--muted); }
.pc-pager button {
    min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; cursor: pointer; font-size: 13px; color: #475569;
}
.pc-pager button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pc-pager button:disabled { opacity: .45; cursor: not-allowed; }

.pc-cert { max-width: 880px; margin: 0 auto; padding: 30px 24px 60px; }
.pc-cert-card { background: #fff; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 12px 40px rgba(18, 38, 92, .07); }
.pc-cert-inner { display: flex; }
.pc-cert-left { flex: 0 0 300px; background: #f8fafc; border-right: 1px solid var(--line); padding: 30px 24px; text-align: center; }
.pc-cert-left .photo { width: 120px; height: 156px; border-radius: 10px; overflow: hidden; margin: 0 auto 16px; background: var(--navy-light); display: flex; align-items: center; justify-content: center; color: #9aa6c0; font-size: 12px; }
.pc-cert-left .photo img { width: 100%; height: 100%; object-fit: cover; }
.pc-cert-left .name { font-size: 22px; font-weight: 700; }
.pc-cert-left .qr { margin-top: 22px; }
.pc-cert-left .qr img { width: 116px; height: 116px; }
.pc-cert-left .qr p { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.pc-cert-right { flex: 1; padding: 30px; }
.pc-cert-right h2 { margin: 0 0 4px; font-size: 18px; }
.pc-cert-right .en { font-size: 11px; color: #9ca3af; letter-spacing: 2px; margin-bottom: 22px; }
.pc-cert-right .row { display: flex; padding: 13px 0; border-bottom: 1px dashed #eef1f6; font-size: 14px; }
.pc-cert-right .row .k { flex: 0 0 100px; color: var(--muted); }
.pc-cert-right .row .v { font-weight: 500; word-break: break-all; }
.pc-cert-right .btns { display: flex; gap: 12px; margin-top: 26px; }

.pc-footer { text-align: center; font-size: 12px; color: #9ca3af; padding: 20px; line-height: 1.9; }

.hide { display: none !important; }

@media (max-width: 860px) {
    .pc-search .grid { grid-template-columns: repeat(2, 1fr); }
    .pc-cert-inner { flex-direction: column; }
    .pc-cert-left { flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* 页脚备案号 */
.icp-line { margin-top: 4px; }
.icp-line a {
    color: inherit; text-decoration: none; opacity: .9;
    transition: opacity .15s, color .15s;
}
.icp-line a:hover { opacity: 1; color: #1d4ed8; text-decoration: underline; }
