/* 电子商务信用评价详情页 —— 证书样式 */

.credit-cert-wrap {
    max-width: 1080px;
    margin: 40px auto 60px;
    padding: 0 16px;
}

/* 外层金边容器（浮雕金边） */
.credit-cert {
    position: relative;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #b8862f 0%, #e9cf86 22%, #fff4cf 38%, #d4af52 55%, #f6e3a8 74%, #b8862f 100%);
    box-shadow:
        0 28px 70px rgba(120,90,20,0.30),
        inset 0 0 0 1px rgba(255,255,255,0.35);
}

/* 内层证书纸 */
.credit-cert-inner {
    position: relative;
    background: #ffffff;
    border-radius: calc(var(--radius-lg) - 8px);
    overflow: hidden;
    /* 浅金底纹 + 中央水印，提升证书质感 */
    background-image:
        radial-gradient(circle at 50% 42%, rgba(184,134,47,0.05) 0%, rgba(184,134,47,0) 60%),
        repeating-linear-gradient(135deg, rgba(184,134,47,0.025) 0 2px, transparent 2px 9px);
}

/* 内层描边（双线荣誉框） */
.credit-cert-inner::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(184,134,47,0.55);
    border-radius: 8px;
    box-shadow: inset 0 0 0 4px rgba(184,134,47,0.10);
    pointer-events: none;
}

/* 顶部证书抬头：无渐变，纯白纸，简洁稳重 */
.credit-cert-inner::before {
    content: none;
}

/* 顶部 / 底部装饰边框（已隐藏） */
.cert-frame-top,
.cert-frame-bottom {
    display: none;
}

/* 证书头部：白底简洁，LOGO 原色显示 */
.cert-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 14px 14px 0;
    padding: 44px 0 34px;
}

.cert-logo {
    margin: 0 auto 18px;
    line-height: 0;
}

.cert-logo img {
    display: block;
    height: 76px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.cert-title {
    font-family: "STZhongsong", "SimSun", "Songti SC", "KaiTi", "STKaiti", serif;
    font-size: 48px;
    font-weight: 400;
    color: #b8862f;
    line-height: 1;
    margin: 16px 0 0;
    letter-spacing: 14px;
    text-indent: 14px;
    text-shadow: 0 1px 2px rgba(184,134,47,0.2);
}

/* 企业核心信息（位于抬头金线之下，留出与内框的间距） */
.cert-enterprise {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 36px 30px 28px;
    padding: 0 24px;
}

.cert-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 26px;
    line-height: 1;
    color: #ffb020;
}

.cert-company {
    font-size: 24px;
    font-weight: 700;
    color: #1a3a6e;
    margin: 0 0 20px;
}

.cert-meta {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-secondary);
}

.cert-meta .value {
    color: var(--text-primary);
    font-weight: 600;
}

.cert-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 20px;
    background: rgba(47,158,96,0.08);
    border: 1px solid rgba(47,158,96,0.25);
    font-size: 14px;
}

.cert-status-label {
    color: var(--text-muted);
}

.cert-status-value {
    color: #2f9e60;
    font-weight: 600;
}

/* 核验项目 */
.cert-checks {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    padding: 22px 28px;
    margin: 0 44px 28px;
    background: rgba(79,163,255,0.04);
    border: 1px solid rgba(79,163,255,0.15);
    border-radius: var(--radius-md);
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.check-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #2f9e60;
}

.cert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: var(--transition);
}

.cert-btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 1px solid rgba(79,163,255,0.5);
    box-shadow: none;
}

.cert-btn-secondary:hover { background: rgba(79,163,255,0.08); transform: translateY(-1px); }

/* 操作按钮：仅公众监督，置于 header 内部右上角 */
.cert-actions {
    position: absolute;
    z-index: 3;
    top: 22px;
    right: 28px;
}

/* 评价结论（颁证词） */
.cert-verdict {
    position: relative;
    z-index: 1;
    margin: 0 44px 32px;
    padding: 30px 34px 26px;
    background: linear-gradient(180deg, #fbf7ed 0%, #fdfcf8 100%);
    border: 1px solid rgba(184,134,47,0.35);
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 2;
    color: #5a4a2a;
    text-align: center;
}

.cert-verdict::before {
    content: "\201C";
    position: absolute;
    top: -6px; left: 18px;
    font-size: 64px;
    line-height: 1;
    font-family: Georgia, "Times New Roman", serif;
    color: rgba(184,134,47,0.35);
}

.cert-verdict p { margin: 0; }

.verdict-result {
    margin-top: 10px !important;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.verdict-level {
    color: #b8862f;
    font-weight: 700;
}

.verdict-sign {
    margin: 14px 0 0;
    text-align: right;
    font-weight: 700;
    color: #1f3a73;
    letter-spacing: 1px;
}

/* 分节 */
.cert-section {
    position: relative;
    z-index: 1;
    margin: 0 44px 28px;
}

.cert-section-title {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 14px;
}

.cert-section-title::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, #d4af52, #b8862f);
}

.cert-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 32px;
}

.cert-info-row {
    display: flex;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.cert-info-label {
    flex-shrink: 0;
    width: 90px;
    color: var(--text-muted);
}

.cert-info-value {
    color: var(--text-primary);
    word-break: break-all;
}

.cert-info-value a {
    color: var(--primary-blue);
    text-decoration: none;
}

.cert-info-value a:hover { text-decoration: underline; }

/* 经营范围 */
.cert-scope {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--border-color);
}

.cert-scope-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cert-scope-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.cert-scope-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-scope-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-blue);
    font-size: 13px;
    cursor: pointer;
}

.cert-scope-toggle .toggle-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.cert-scope-toggle.expanded .toggle-icon { transform: rotate(180deg); }

/* 证书说明 */
.cert-notes {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.cert-notes li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 10px;
}

.cert-notes li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
}

/* 印章 */
.cert-seal {
    position: absolute;
    right: 60px;
    bottom: 90px;
    width: 110px;
    height: 110px;
    opacity: 0.9;
    pointer-events: none;
}

.cert-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-seal-fallback {
    display: none;
    width: 110px;
    height: 110px;
    border: 3px solid #c41e3a;
    border-radius: 50%;
    color: #c41e3a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.cert-seal img[src=""] + .cert-seal-fallback,
.cert-seal img:not([src]) + .cert-seal-fallback {
    display: flex;
}

/* 返回列表 */
.cert-back {
    position: relative;
    z-index: 1;
    margin: 36px 44px 0;
    padding: 28px 0 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.cert-back .btn-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .credit-cert-wrap { margin: 24px auto 40px; }

    .credit-cert { padding: 8px; }

    .credit-cert-inner { padding: 0; }

    .credit-cert-inner::after { inset: 10px; }

    .credit-cert-inner::before { content: none; }

    .cert-header { margin: 10px 10px 0; padding: 30px 12px 26px; }

    .cert-title { font-size: 24px; letter-spacing: 4px; text-indent: 4px; color: #1a1a1a; }

    .cert-logo img { display: block; height: 58px; margin: 0 auto; }

    .cert-enterprise { margin: 26px 18px 22px; padding: 0 8px 22px; }

    .cert-company { font-size: 20px; }

    .cert-meta { gap: 10px 20px; }

    .cert-checks { grid-template-columns: 1fr; gap: 12px; padding: 18px; margin: 0 22px 24px; }

    .cert-verdict { margin: 0 22px 26px; padding: 24px 20px; }

    .cert-section { margin: 0 22px 24px; }

    .cert-back { margin: 30px 22px 0; padding: 24px 0 34px; }

    .cert-info-grid { grid-template-columns: 1fr; gap: 12px; }

    .cert-actions {
        position: absolute;
        top: 16px;
        right: 16px;
        text-align: right;
    }

    .cert-btn {
        width: auto;
        padding: 7px 16px;
        font-size: 13px;
    }

    .cert-btn-secondary {
        background: transparent;
        color: var(--primary-blue);
        border: 1px solid rgba(79,163,255,0.5);
    }

    .cert-seal {
        position: static;
        margin: 24px auto 0;
        width: 90px;
        height: 90px;
    }
}
