/* ==========================================================================
   证书查询（前台顶部搜索 + 搜索结果页 + 证书详情页）
   独立样式，前缀统一使用 daf-cert / daf-badge，避免影响站点原有样式
   ========================================================================== */

/* ---------- 顶部搜索框 ---------- */
.daf-cert-search {
    position: absolute;
    /* 整体右移 200px：避开左侧电话号块（.telno，容器内 1020..1270）
       以及微信图标（li.wx，容器内 1280..1330，由 .navigation-inner 的 right:-370px 定位）。
       负数代表超出 .topcenter（1370px 居中容器）右边框，仍在页头白色背景范围内。
       下拉面板与此同步右移，保持上下对齐。 */
    right: -200px;
    top: 37px;
    width: 178px;
    z-index: 100000002;
}

.daf-cert-search .daf-input-wrap {
    position: relative;
    height: 34px;
}

.daf-cert-search input.daf-keyword {
    width: 100%;
    height: 34px;
    line-height: 34px;
    padding: 0 36px 0 13px;
    border: 1px solid #d8dae6;
    border-radius: 17px;
    background: #f7f8fc;
    color: #333;
    font-size: 13px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    box-sizing: border-box;
    outline: none;
    -webkit-transition: all .18s ease;
    transition: all .18s ease;
}

.daf-cert-search input.daf-keyword::-webkit-input-placeholder {
    color: #a6abbf;
}

.daf-cert-search input.daf-keyword:focus {
    border-color: #3f4198;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(63, 65, 152, .12);
}

.daf-cert-search .daf-submit {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #3f4198;
    color: #fff;
    cursor: pointer;
    outline: none;
    line-height: 28px;
    text-align: center;
    -webkit-transition: background .18s ease;
    transition: background .18s ease;
}

.daf-cert-search .daf-submit:hover {
    background: #2b2d77;
}

/* 视口不够宽时收回容器内，避免右移到容器外的搜索框被裁掉。
   搜索框右边缘位于容器内 1569px，容器居中，故视口需 >= 1768px 才能完整显示。 */
@media (max-width: 1780px) {
    .daf-cert-search {
        right: 0;
    }
}

.daf-cert-search .daf-submit svg {
    vertical-align: middle;
}

/* ---------- 搜索结果下拉面板 ---------- */
.daf-cert-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    width: 430px;
    background: #fff;
    border: 1px solid #e6e8f0;
    border-radius: 10px;
    box-shadow: 0 14px 38px rgba(28, 31, 74, .18);
    overflow: hidden;
}

.daf-cert-panel.open {
    display: block;
}

.daf-cert-panel-head {
    padding: 9px 14px;
    font-size: 12px;
    color: #8a8f98;
    background: #fafbff;
    border-bottom: 1px solid #f0f1f6;
}

.daf-cert-panel-head b {
    color: #3f4198;
    font-weight: 700;
}

.daf-cert-panel-body {
    max-height: 352px;
    overflow-y: auto;
}

.daf-cert-panel-foot {
    display: none;
    border-top: 1px solid #f0f1f6;
    background: #fafbff;
    text-align: center;
}

.daf-cert-panel-foot a {
    display: block;
    padding: 10px 0;
    font-size: 13px;
    color: #3f4198;
    text-decoration: none;
}

.daf-cert-panel-foot a:hover {
    background: #f2f3fb;
}

/* ---------- 结果条目 ---------- */
.daf-cert-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f4f5f9;
    text-decoration: none;
    -webkit-transition: background .15s ease;
    transition: background .15s ease;
}

.daf-cert-item:last-child {
    border-bottom: 0;
}

.daf-cert-item:hover {
    background: #f7f8fd;
}

.daf-cert-thumb {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 54px;
    flex: 0 0 54px;
    width: 54px;
    height: 40px;
    margin-right: 12px;
    border: 1px solid #e6e8f0;
    border-radius: 6px;
    background-color: #fafbff;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #c3c7db;
}

.daf-cert-main {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}

.daf-cert-no {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2b2d77;
    font-family: Consolas, Monaco, "Courier New", monospace;
    letter-spacing: .3px;
    word-break: break-all;
}

.daf-cert-sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #8a8f98;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 状态徽标 ---------- */
.daf-badge {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
}

.daf-badge-1 {
    background: #e8f6ef;
    color: #1f8a5b;
}

.daf-badge-2 {
    background: #fdf2e0;
    color: #b5730a;
}

.daf-badge-3 {
    background: #fdecec;
    color: #c53b3b;
}

.daf-badge-0 {
    background: #f0f1f5;
    color: #8a8f98;
}

/* ---------- 缺省页 / 空状态 ---------- */
.daf-empty {
    padding: 38px 24px 34px;
    text-align: center;
}

.daf-empty .daf-empty-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f3f4fb;
    color: #b9bdd6;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.daf-empty h4 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: #2b2d77;
}

.daf-empty p {
    margin: 0 auto;
    max-width: 460px;
    font-size: 13px;
    color: #8a8f98;
    line-height: 2;
}

.daf-empty .daf-kw {
    color: #3f4198;
    font-weight: 700;
    font-family: Consolas, Monaco, "Courier New", monospace;
    word-break: break-all;
}

.daf-empty .daf-empty-actions {
    margin-top: 20px;
}

.daf-empty .daf-btn {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 18px;
    background: #3f4198;
    color: #fff !important;
    font-size: 13px;
    text-decoration: none;
}

.daf-empty .daf-btn:hover {
    background: #2b2d77;
}

/* ---------- 搜索结果页 / 详情页 ---------- */
#dafCertPage {
    width: 1250px;
    margin: 123px auto 0;
    padding: 30px 0 60px;
}

#dafCertPage .daf-crumb {
    height: 50px;
    line-height: 50px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e6e8f0;
    font-size: 15px;
    color: #666;
    text-indent: 26px;
    background: url(../img/home.gif) left center no-repeat;
}

#dafCertPage .daf-crumb a {
    color: #2b2d77;
}

#dafCertPage .daf-crumb span {
    color: #8a8f98;
}

.daf-card {
    background: #fff;
    border: 1px solid #e9eaf3;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(28, 31, 74, .06);
}

.daf-card-head {
    padding: 16px 22px;
    border-bottom: 1px solid #f0f1f6;
    font-size: 15px;
    color: #2b2d77;
    font-weight: 700;
}

.daf-card-head em {
    font-style: normal;
    color: #8a8f98;
    font-weight: 400;
    font-size: 13px;
    margin-left: 8px;
}

/* 结果列表（整页） */
.daf-result-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #f4f5f9;
    text-decoration: none;
    -webkit-transition: background .15s ease;
    transition: background .15s ease;
}

.daf-result-item:last-child {
    border-bottom: 0;
}

.daf-result-item:hover {
    background: #f7f8fd;
}

.daf-result-item .daf-cert-thumb {
    -ms-flex: 0 0 96px;
    flex: 0 0 96px;
    width: 96px;
    height: 68px;
    border-radius: 8px;
}

.daf-result-item .daf-cert-no {
    font-size: 16px;
}

.daf-result-item .daf-cert-sub {
    font-size: 13px;
    margin-top: 6px;
}

.daf-result-item .daf-arrow {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-left: 14px;
    color: #c3c7db;
}

/* 详情页 */
.daf-detail {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 26px 26px 30px;
}

.daf-detail-media {
    -ms-flex: 0 0 430px;
    flex: 0 0 430px;
    width: 430px;
    margin-right: 30px;
}

.daf-detail-media .daf-shot {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 430px;
    height: 320px;
    border: 1px solid #e9eaf3;
    border-radius: 10px;
    background: #fafbff;
    overflow: hidden;
}

.daf-detail-media .daf-shot img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.daf-detail-media .daf-shot-tip {
    margin-top: 10px;
    font-size: 12px;
    color: #a6abbf;
    text-align: center;
}

.daf-detail-info {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}

.daf-detail-title {
    padding-bottom: 16px;
    margin-bottom: 6px;
    border-bottom: 1px dashed #e6e8f0;
}

.daf-detail-title .daf-detail-no {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2b2d77;
    font-family: Consolas, Monaco, "Courier New", monospace;
    letter-spacing: .5px;
    word-break: break-all;
}

.daf-detail-title .daf-detail-en {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #a6abbf;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.daf-detail-title .daf-badge {
    display: inline-block;
    margin: 12px 0 0;
    padding: 3px 12px;
    font-size: 12px;
    line-height: 18px;
    border-radius: 12px;
}

.daf-fields {
    margin: 0;
    padding: 8px 0 0;
}

.daf-fields .daf-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 11px 0;
    border-bottom: 1px solid #f6f7fb;
    font-size: 14px;
    line-height: 22px;
}

.daf-fields .daf-row:last-child {
    border-bottom: 0;
}

.daf-fields .daf-label {
    -ms-flex: 0 0 96px;
    flex: 0 0 96px;
    width: 96px;
    color: #8a8f98;
}

.daf-fields .daf-value {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    color: #333;
    word-break: break-all;
}

.daf-detail-actions {
    margin-top: 22px;
}

.daf-detail-actions .daf-btn {
    display: inline-block;
    padding: 9px 24px;
    margin-right: 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    -webkit-transition: all .18s ease;
    transition: all .18s ease;
}

.daf-detail-actions .daf-btn-primary {
    background: #3f4198;
    color: #fff !important;
}

.daf-detail-actions .daf-btn-primary:hover {
    background: #2b2d77;
}

.daf-detail-actions .daf-btn-ghost {
    border: 1px solid #d8dae6;
    color: #666 !important;
    background: #fff;
}

.daf-detail-actions .daf-btn-ghost:hover {
    border-color: #3f4198;
    color: #3f4198 !important;
}

/* 命中关键字高亮 */
.daf-hl {
    color: #e8930c;
    font-weight: 700;
}

/* 打印时只保留证书内容 */
@media print {
    #tophead, #footer, .daf-crumb, .daf-detail-actions {
        display: none !important;
    }

    #dafCertPage {
        margin: 0;
        width: auto;
        padding: 0;
    }

    .daf-card {
        border: 0;
        box-shadow: none;
    }
}
