/* ============================================================
   赛姆认证 · 自愿性产品认证证书查询平台 —— 前台样式
   移动优先，主色 #53a3fa，页面背景 #f2f3f5
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: #f2f3f5;
    color: #323233;
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: rgba(0,0,0,0); }
ul { list-style: none; }

/* ---------- 首页 ---------- */
.page-home { min-height: 100vh; display: flex; flex-direction: column; }

.home-banner {
    background: linear-gradient(135deg, #53a3fa 0%, #3b8ef0 100%);
    padding: 48px 20px 64px;
    text-align: center;
    color: #fff;
    border-radius: 0 0 24px 24px;
}
.banner-logo {
    width: 72px; height: 72px; margin: 0 auto 14px;
    background: #fff;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 62, 140, .18);
    overflow: hidden;
}
.banner-logo img { width: 56px; height: auto; display: block; }
.banner-title { font-size: 21px; font-weight: 600; letter-spacing: 1px; margin-bottom: 8px; }
.banner-sub { font-size: 13px; opacity: .88; margin-bottom: 22px; }
.banner-search-btn {
    display: flex; align-items: center; gap: 8px;
    max-width: 420px; margin: 0 auto;
    background: #fff; color: #969799;
    border-radius: 22px; padding: 11px 18px;
    font-size: 14px; text-align: left;
    box-shadow: 0 6px 18px rgba(0, 62, 140, .25);
    transition: transform .15s ease;
}
.banner-search-btn:active { transform: scale(.98); }
.banner-search-btn .search-ico { font-size: 15px; }

.home-main { flex: 1; padding: 0 14px; max-width: 640px; margin: 0 auto; width: 100%; }

.grid-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 12px;
    margin-top: -32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 2;
}
.grid-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 4px 10px;
    border-radius: 10px;
    transition: background .15s ease;
}
.grid-item:active { background: #f2f3f5; }
.grid-icon { font-size: 28px; margin-bottom: 8px; }
.grid-title { font-size: 13px; font-weight: 500; color: #323233; }
.grid-desc {
    font-size: 10px; color: #969799; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.grid-item-primary .grid-title { color: #53a3fa; font-weight: 600; }

.home-tips {
    background: #fff; border-radius: 14px;
    margin-top: 14px; padding: 16px;
}
.home-tips h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: #323233; }
.home-tips li {
    position: relative; padding-left: 14px;
    font-size: 12.5px; color: #646566; margin-bottom: 8px; line-height: 1.7;
}
.home-tips li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 5px; height: 5px; border-radius: 50%; background: #53a3fa;
}

.home-footer {
    text-align: center; padding: 26px 14px 34px;
    color: #969799; font-size: 12px;
}
.home-footer .copyright { margin-top: 4px; color: #c8c9cc; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center;
    height: 46px;
    background: #53a3fa; color: #fff;
    padding: 0 8px;
}
.topbar-back {
    width: 40px; font-size: 26px; line-height: 46px;
    text-align: center; color: #fff; font-weight: 300;
}
.topbar-title { flex: 1; text-align: center; font-size: 16px; font-weight: 500; }
.topbar-placeholder { width: 40px; }

/* ---------- 查询页（仿参考站） ---------- */
.page-inquiry { min-height: 100vh; }

.logo-box {
    display: flex; justify-content: center;
    padding: 50px 20px 24px;
}
.logo-box img { width: 150px; height: auto; display: block; }

.inquiry-title {
    text-align: center; font-size: 17px; font-weight: 600;
    color: #323233; margin: 0 16px 18px;
}
.inquiry-tips { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.inquiry-tips .home-tips { margin-top: 0; }

.common-search-box {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; max-width: 640px; margin: 0 auto;
}
.input-box {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 8px;
    padding: 10px 12px;
}
.input-box .icon-search { font-size: 14px; color: #969799; }
.input-box input {
    flex: 1; border: none; background: transparent;
    font-size: 14px; outline: none; color: #323233;
}
.search-btn {
    flex-shrink: 0;
    height: 40px; padding: 0 20px;
    border: none; border-radius: 8px;
    background: #53a3fa; color: #fff;
    font-size: 15px; cursor: pointer;
}
.search-btn:active { opacity: .85; }

.result-box {
    padding: 16px; max-width: 640px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 16px;
}

.no-result {
    text-align: center; color: #969799; font-size: 14px;
    padding: 60px 0;
}

/* 结果卡片（参考站 content-box） */
.content-box {
    background: #fff;
    border-radius: 10px;
    padding: 0 15px 15px;
    font-size: 16px;
}
.content-box .title-box {
    padding: 10px 0;
    border-bottom: 1px solid #ebedf0;
    font-weight: 500;
    word-break: break-all;
}
.content-box .status-box {
    margin-top: 10px;
    font-weight: 500;
}
.status-box.st-valid  { color: #07c160; }   /* 有效 绿 */
.status-box.st-pause  { color: #ff976a; }   /* 暂停 橙 */
.status-box.st-revoke { color: #ee0a24; }   /* 撤销 红 */
.status-box.st-cancel { color: #969799; }   /* 注销 灰 */
.status-box.st-expire { color: #1989fa; }   /* 过期 蓝 */
.status-box.st-other  { color: #969799; }

.content-box .date-box { margin-top: 10px; }
.content-box .date-box .item {
    display: flex; justify-content: flex-start; align-items: flex-start;
    padding: 5px 0;
    font-size: 14px;
}
.content-box .date-box .item .name {
    flex-shrink: 0;
    width: 90px;
    text-align: right;
    margin-right: 15px;
    color: #969799;
}
.content-box .date-box .item .value {
    flex: 1;
    word-break: break-all;
    color: #646566;
}

.content-box .detail-btn {
    display: block;
    margin: 14px auto 0;
    width: 70%;
    height: 38px; line-height: 38px;
    text-align: center;
    background: #53a3fa; color: #fff;
    border-radius: 19px;
    font-size: 14px;
}
.content-box .detail-btn:active { opacity: .85; }

/* ---------- 分页（后台/备用） ---------- */
.pagination {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 6px; padding: 16px 0 8px;
}
.page-link {
    min-width: 34px; height: 34px; line-height: 34px;
    text-align: center; padding: 0 8px;
    border: 1px solid #dcdee0; border-radius: 6px;
    background: #fff; font-size: 13px; color: #323233;
}
.page-link.current {
    background: #53a3fa; border-color: #53a3fa;
    color: #fff; font-weight: 500;
}
.page-ellipsis { line-height: 34px; color: #969799; }

/* ---------- 状态徽标（详情页/通用） ---------- */
.badge {
    display: inline-block;
    font-size: 11px; line-height: 1;
    padding: 4px 9px; border-radius: 10px;
    color: #fff; white-space: nowrap;
}
.badge-valid  { background: #07c160; }
.badge-pause  { background: #ff976a; }
.badge-revoke { background: #ee0a24; }
.badge-cancel { background: #969799; }
.badge-expire { background: #1989fa; }
.badge-other  { background: #c8c9cc; }

/* ---------- 详情页 ---------- */
.page-detail { max-width: 720px; margin: 0 auto; background: #f2f3f5; min-height: 100vh; }

/* 浅色顶栏 */
.topbar-light {
    background: #fff; color: #323233;
    border-bottom: 1px solid #ebedf0;
}
.topbar-light .topbar-back { color: #323233; }

/* 证书信息卡（着重证书编号） */
.cert-hero {
    background: #fff;
    margin: 12px 10px 0;
    border-radius: 10px;
    padding: 18px 16px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    text-align: center;
}
.cert-hero-top {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e5e6eb;
}
.cert-hero-logo { height: 40px; width: auto; display: block; }
.cert-hero-type { text-align: left; line-height: 1.35; }
.cert-hero-type strong { display: block; font-size: 15px; color: #1f2d3d; font-weight: 600; }
.cert-hero-type span {
    display: block; font-size: 9px; color: #969799;
    letter-spacing: 1.5px; margin-top: 2px;
}
.cert-hero-no {
    margin: 14px 0 12px;
    font-size: 23px; font-weight: 800; color: #1f2d3d;
    letter-spacing: 1px; word-break: break-all;
}
.cert-hero-meta {
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.cert-dl-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px;
    border: 1px solid #53a3fa; border-radius: 16px;
    color: #53a3fa; font-size: 12px;
    text-decoration: none;
    background: #fff;
}
.cert-dl-btn svg { width: 14px; height: 14px; }
.cert-dl-btn:active { background: #f2f8ff; }

.detail-groups { padding: 12px 10px 24px; }
.detail-table {
    width: 100%; border-collapse: collapse;
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    table-layout: fixed;
}
.detail-table td {
    border: 1px solid #ebedf0;
    padding: 9px 10px;
    font-size: 13px;
    vertical-align: middle;
    word-break: break-all;
}
.detail-table .group-cell {
    width: 58px;
    text-align: center;
    background: #f2f6fc;
    color: #53a3fa;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.5;
}
.detail-table .field-cell {
    width: 38%;
    text-align: center;
    color: #646566;
    background: #fafbfc;
}
.detail-table .value-cell { color: #323233; }
.detail-table .value-cell .val-empty { color: #c8c9cc; }
.detail-table .range-sep { color: #969799; padding: 0 4px; }

@media (min-width: 640px) {
    .grid-panel { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px 18px; }
    .grid-icon { font-size: 32px; }
    .detail-table .group-cell { width: 90px; }
}
