/* ==========================================================
   Mexant 桥接层：模板 UI + SSL 功能样式共存
   加载顺序：模板 CSS → styles.css → loader.css → theme.css → 本表
   ========================================================== */

/* 功能区域的强调色改为模板绿，保持整体协调 */
:root {
    --accent: #43ba7f;
    --accent-dark: #36a06c;
    --page: #ffffff;
}

/* 全局字体与底色回到模板设定 */
html { scroll-padding-top: 62px; }
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #fff;
    color: #212741;
    font-size: 15px;
}
a { color: #43ba7f; }
a:hover { color: #ff511a; }

/* 页首：始终固定、降低高度，避免滚动后依赖 JS 加类导致消失 */
.header-area,
.header-area.background-header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    height: 62px !important;
    min-height: 62px !important;
    z-index: 100 !important;
}
.header-area .main-nav { display: block; gap: 0; margin-left: 0; min-height: 62px; }
.header-area .main-nav .nav { float: right; margin: 0; height: 62px; }
.header-area .main-nav .nav li { padding-left: 25px; padding-right: 25px; }
.header-area .main-nav .nav li:last-child { padding-right: 0; }
.header-area .main-nav .logo { float: left; display: inline-flex; align-items: center; color: #fff; font-size: 24px; font-weight: 700; line-height: 62px; letter-spacing: 1px; text-transform: none; }
.header-area .main-nav .logo img { width: 24px; height: 28px; display: inline-block; margin-right: 8px; vertical-align: middle; }
.background-header .main-nav .logo { line-height: 62px; width: auto !important; }
/* 模板滚动后加 .background-header 会强制把 nav 下移 18px，这里锁定位置 */
.header-area.background-header .main-nav .nav { margin: 0 !important; }
/* 证书类型卡片：内容作为整体在卡片内垂直居中 */
#services .service-item { display: flex; align-items: center; }
#services .service-inner { display: flex; align-items: center; width: 100%; }
#services .service-inner i { float: none; flex: none; margin: 0 24px 0 0; }
#services .service-copy { flex: 1; min-width: 0; }
#services .service-item h4,
#services .service-item p { display: flow-root; overflow: hidden; }

/* 右上角欢迎语与语言切换 */
/* 欢迎语下拉菜单 */
.header-area .main-nav .nav li.nav-user { padding-left: 16px; padding-right: 0; }
.header-area .main-nav .nav li.nav-user .user-dropdown { position: relative; }
.header-area .main-nav .nav li.nav-user .welcome-text {
    display: inline-flex; align-items: center; gap: 8px; color: #fff !important;
    font-size: 13px; font-weight: 500; font-family: inherit;
    padding: 5px 12px; border-radius: 20px; cursor: pointer;
    background: rgba(67, 186, 127, .18); border: 1px solid rgba(67, 186, 127, .5);
    white-space: nowrap; text-shadow: none;
}
.header-area .main-nav .nav li.nav-user .welcome-text .caret {
    width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid #fff; transition: transform .2s;
}
.header-area .main-nav .nav li.nav-user .user-menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 130px;
    background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.22);
    padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: all .2s; z-index: 200;
}
.header-area .main-nav .nav li.nav-user .user-dropdown:hover .user-menu,
.header-area .main-nav .nav li.nav-user .user-dropdown.open .user-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.header-area .main-nav .nav li.nav-user .user-menu a {
    display: block; padding: 8px 12px; border-radius: 5px; color: #c0392b !important;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    line-height: 1.4; height: auto; min-height: 0; text-shadow: none;
}
.header-area .main-nav .nav li.nav-user .user-menu a:hover { background: #fff2f0; color: #c0392b !important; }
.header-area .main-nav .nav li.nav-lang { padding-left: 16px; }
.header-area .main-nav .nav li .lang-toggle {
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .5);
    color: #fff; border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 500;
    line-height: 1.4; cursor: pointer; transition: all .2s;
}
.header-area .main-nav .nav li .lang-toggle:hover { background: #ff511a; border-color: #ff511a; }
/* 四步卡片：统一为图标+文字横向居中，卡片等高 */
#how-it-works .row { align-items: stretch; }
#how-it-works .service-item { display: flex; align-items: center; height: 100%; min-height: 168px; }
#how-it-works .service-inner { display: flex; align-items: center; width: 100%; }
#how-it-works .service-inner i { float: none; flex: none; margin: 0 20px 0 0; }
#how-it-works .service-copy { flex: 1; min-width: 0; }

/* 品牌对比卡片：等高 + 文字不绕图标 */
#providers .row { align-items: stretch; }
#providers .service-item { display: flex; align-items: center; height: 100%; min-height: 168px; }
#providers .service-inner { display: flex; align-items: center; width: 100%; }
#providers .service-inner i { float: none; flex: none; margin: 0 24px 0 0; }
#providers .service-copy { flex: 1; min-width: 0; }
#providers .service-item h4,
#providers .service-item p { display: flow-root; overflow: hidden; }
.header-area .main-nav .nav li a { color: #fff; font-size: 14px; font-weight: 300; }
.header-area .main-nav .nav li:hover a,
.header-area .main-nav .nav li a.active { color: #ff511a; }
/* 导航项统一垂直居中；发光按钮不被模板“最后一项变按钮”规则影响 */
.header-area .main-nav .nav { display: flex; align-items: center; margin-top: 0 !important; }
.header-area .main-nav .nav li { display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.header-area .main-nav .nav li a.nav-send-button,
.header-area .main-nav .nav li:last-child a.nav-send-button,
.header-area .main-nav .nav li button.nav-send-button {
    background: transparent; padding: 6px 12px; border-radius: 10px; height: 40px;
    line-height: 1; font-size: 13px; font-weight: 600; color: #212741; text-shadow: 0 1px 1px rgba(0,0,0,.3);
}
.header-area .main-nav .nav li a.nav-send-button:hover,
.header-area .main-nav .nav li button.nav-send-button:hover { color: #212741; }

/* 证书类型三张卡片等高 */
#services .row { align-items: stretch; }
#services .service-item { height: 100%; min-height: 168px; }

/* 模板按钮不被功能按钮样式污染 */
.green-button a,
.orange-button a { color: #fff; font-size: 14px; font-weight: 500; padding: 12px 30px; border-radius: 5px; }
.green-button a { background-color: #43ba7f; }
.orange-button a { background-color: #ff511a; }
.green-button a:hover,
.orange-button a:hover { color: #fff; opacity: .9; }

/* section 标题沿用模板 h6/h4 体系 */
.section-heading { text-align: center; }
.section-heading h6 { display: none; }
.section-heading h4 { color: #212741; font-size: 36px; font-weight: 700; line-height: 1.3; }

/* 功能容器与模板网格的间距 */
.application-section { padding: 100px 0 20px; }
.application-section .section-heading { margin-bottom: 50px; }
.application-card {
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(33, 39, 65, .09);
    overflow: hidden;
}

/* dialog / 加载遮罩保持功能样式，仅统一圆角与字体 */
.history-dialog { border-radius: 8px; font-family: inherit; }

/* 账号页只统一字体与强调色，dashboard 结构原样保留 */
body.dash { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
body.dash .button-primary,
body.dash .dash-toast.is-visible { background-color: #43ba7f; }

/* 去掉模板人物图：hero 轮播改用抽象渐变背景 */
.slide-inner {
    background-image:
        radial-gradient(circle at 78% 26%, rgba(67, 186, 127, .32), transparent 46%),
        radial-gradient(circle at 18% 76%, rgba(255, 81, 26, .28), transparent 52%),
        linear-gradient(135deg, #171d33 0%, #212741 58%, #2b3356 100%);
    background-size: cover;
}

/* 不使用模板任何图片：其余模板背景一律改为 CSS 纯色/渐变 */
.header-area { background-image: none !important; background-color: rgba(33, 39, 65, .96); }
.background-header { background-image: none !important; background-color: #212741 !important; }
section.simple-cta { background-image: linear-gradient(135deg, #171d33 0%, #212741 60%, #2b3356 100%) !important; }
section.calculator { background-image: none !important; }
.page-heading { background-image: none !important; }

@media (max-width: 991px) {
    .header-area .main-nav .nav { display: none; }
    .application-section { padding-top: 60px; }
}

/* ==========================================================
   证书签发结果页：提升对比度、字号与信息层级
   仅作用于 #result-panel，不影响申请表单和其他页面
   ========================================================== */

/* 模板全局 section { margin-top: 120px; } 会作用到流程面板，
   导致结果页出现大块空白；这里只重置申请流程内部的 section */
#workflow > section {
    margin-top: 0;
}

/* 成功提示条 */
#form-message[data-kind="success"] {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #05603a;
    font-size: 13.5px;
    line-height: 1.7;
    border-radius: 10px;
    padding: 14px 18px;
}

/* 已签发概要 */
#workflow .order-summary {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom-color: #e4e7ec;
    font-size: 13px;
    color: #475467;
}
#workflow .order-summary strong {
    color: #101828;
    font-size: 15px;
}
#workflow .order-summary .muted {
    color: #475467;
}

/* 标题区 */
#result-panel {
    padding-top: 2px;
}
#result-panel .result-heading {
    align-items: flex-start;
    gap: 18px;
    margin: 2px 0 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e4e7ec;
}
#result-panel .result-check {
    width: 56px;
    height: 56px;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
    font-size: 28px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
#result-panel #result-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 650;
    color: #101828;
}
#result-panel .result-heading p:last-child {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.7;
    color: #475467;
}
#result-panel #result-info {
    padding-bottom: 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #475467;
}

/* 下载卡片 */
#result-panel .download-area {
    gap: 14px;
}
#result-panel .download-card {
    min-height: 104px;
    padding: 17px 19px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
#result-panel .download-card:hover {
    border-color: #1b5bd6;
    background: #f5f8ff;
    box-shadow: 0 4px 14px rgba(27, 91, 214, .12);
}
#result-panel .download-card:focus-visible {
    outline: 3px solid #9dbfff;
    outline-offset: 2px;
}
#result-panel .download-card .file-type {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: #eef4ff;
    color: #1b5bd6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
}
#result-panel .download-card strong {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #101828;
}
#result-panel .download-card > span:not(.file-type):not(.download-arrow) {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #475467;
}

/* 续期提醒 */
#result-panel .renewal-note {
    margin: 20px 0 0;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
}
#result-panel .renewal-note strong {
    font-size: 13.5px;
    color: #101828;
}
#result-panel .renewal-note p {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.65;
    color: #475467;
}

/* 清除本地私钥 */
#result-panel .local-key-removal {
    margin-top: 18px;
    padding: 16px 18px;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
}
#result-panel .local-key-removal strong {
    font-size: 13.5px;
    color: #344054;
}
#result-panel .local-key-removal p {
    font-size: 12.5px;
    line-height: 1.65;
    color: #475467;
}

@media (max-width: 640px) {
    #result-panel .result-heading {
        gap: 14px;
        padding-bottom: 16px;
    }
    #result-panel .result-check {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
    #result-panel #result-title {
        font-size: 24px;
    }
    #result-panel .download-card {
        min-height: 0;
        padding: 15px 16px;
    }
    #result-panel .local-key-removal {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================================
   验证记录复制按钮：圆点扩散动画
   ========================================================== */
.copy-row .animated-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 32px;
    padding: 6px 14px;
    border: 0;
    border-radius: 100px;
    background: #f2f6fd;
    color: #1b5bd6;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 0 0 1px #d0d5dd;
    cursor: pointer;
    overflow: hidden;
    transition: all .6s cubic-bezier(.23, 1, .320, 1);
}
.copy-row .animated-button span:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #1b5bd6;
    border-radius: 50%;
    opacity: 0;
    transition: all .8s cubic-bezier(.23, 1, .320, 1);
}
.copy-row .animated-button span:first-child {
    position: relative;
    z-index: 1;
}
.copy-row .animated-button:hover {
    box-shadow: 0 0 0 3px rgba(27, 91, 214, .18);
    color: #fff;
}
.copy-row .animated-button:active {
    scale: .95;
}
.copy-row .animated-button:hover span:last-child {
    width: 120px;
    height: 120px;
    opacity: 1;
}
.copy-row .animated-button.is-copied {
    color: #fff;
    box-shadow: 0 0 0 3px rgba(6, 118, 71, .18);
}
.copy-row .animated-button.is-copied span:last-child {
    width: 120px;
    height: 120px;
    opacity: 1;
    background: #067647;
}

/* ==========================================================
   申请记录操作按钮：按压式立体按钮
   ========================================================== */
.history-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}
.push-button {
    --button_radius: 0.65em;
    --button_color: #fff;
    --button_outline_color: #101828;
    padding: 0;
    border: 0;
    background: var(--button_outline_color);
    border-radius: var(--button_radius);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.push-button .button_top {
    display: block;
    box-sizing: border-box;
    padding: 0.6em 1.1em;
    border: 1.5px solid var(--button_outline_color);
    border-radius: var(--button_radius);
    background: var(--button_color);
    color: var(--button_outline_color);
    white-space: nowrap;
    transform: translateY(-0.18em);
    transition: transform .1s ease;
}
.push-button:hover .button_top {
    transform: translateY(-0.3em);
}
.push-button:active .button_top {
    transform: translateY(0);
}
.push-button:focus-visible {
    outline: 2px solid #1b5bd6;
    outline-offset: 3px;
}
.push-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.push-button:disabled .button_top {
    transform: translateY(-0.18em);
}

@media (max-width: 640px) {
    .copy-row .animated-button {
        min-height: 40px;
    }
    .history-actions {
        width: 100%;
    }
}

/* 结果页底部：检查进度 / 重新申请 */
.restart-row .push-button {
    font-size: 12px;
}

/* ==========================================================
   申请记录弹窗关闭按钮：圆形开关（✖️ / ✔️）
   ========================================================== */
.close-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: none;
    cursor: pointer;
}
.close-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.close-toggle-circle {
    position: relative;
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: #fb7185;
    box-shadow: 0 4px 6px -1px rgba(16, 24, 40, .1), 0 2px 4px -2px rgba(16, 24, 40, .1);
    transition: background-color .3s ease;
}
.close-toggle-circle::after {
    content: '✖️';
    position: absolute;
    top: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #f9fafb;
    font-size: 18px;
    line-height: 1;
    transform: rotate(-180deg);
    transition: transform .5s ease, background-color .5s ease;
}
.close-toggle input:checked + .close-toggle-circle {
    background: #10b981;
}
.close-toggle input:checked + .close-toggle-circle::after {
    content: '✔️';
    transform: rotate(0);
}
.close-toggle:hover .close-toggle-circle::after {
    transform: rotate(-180deg) scale(.75);
}
.close-toggle:hover input:checked + .close-toggle-circle::after {
    transform: rotate(0) scale(.75);
}
.close-toggle input:focus-visible + .close-toggle-circle {
    outline: 2px solid #1b5bd6;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .close-toggle-circle {
        width: 42px;
        height: 42px;
    }
    .close-toggle-circle::after {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}
