/* ============================================================================
   救援工作证样式 (work_card.css)
   用于后台"工作证管理"与前台"我的工作证"页面。
   设计：单张竖版证件卡 + 二维码防伪；支持浏览器打印导出。
   ============================================================================ */

/* 证件卡容器（页面中为居中显示） */
.wc-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* 证件卡本体 */
.wc-card {
    width: 360px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(10, 61, 98, 0.18);
    overflow: hidden;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    color: #1a2b3c;
    border: 1px solid #e1e8ef;
}

/* 顶部色带 */
.wc-card-header {
    background: linear-gradient(135deg, #0a3d62 0%, #1e6fb8 100%);
    color: #fff;
    padding: 14px 18px 16px;
    position: relative;
}
.wc-org {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}
.wc-sub {
    font-size: 10px;
    opacity: 0.8;
    letter-spacing: 2px;
    margin-top: 2px;
}
.wc-badge {
    position: absolute;
    right: 16px;
    top: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    letter-spacing: 1px;
}

/* 主体：照片 + 信息 + 二维码 */
.wc-card-body {
    display: flex;
    padding: 16px 18px;
    gap: 14px;
}
.wc-photo {
    width: 96px;
    height: 120px;
    flex: 0 0 96px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f8;
    border: 1px solid #d8e2ec;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wc-photo .wc-photo-ph {
    font-size: 34px;
    color: #9fb4c7;
}

.wc-info {
    flex: 1;
    min-width: 0;
}
.wc-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.wc-level {
    font-size: 12px;
    font-weight: 600;
    color: #0a3d62;
    background: #e6f0fa;
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
}
.wc-row {
    font-size: 13px;
    line-height: 1.9;
    display: flex;
    gap: 6px;
}
.wc-label {
    color: #7a8a99;
    flex: 0 0 42px;
}
.wc-value {
    color: #1a2b3c;
    word-break: break-all;
}

.wc-qr {
    margin-top: 8px;
    text-align: center;
}
.wc-qr #wcQrcode,
.wc-qr .wc-qr-box {
    width: 104px;
    height: 104px;
    margin: 0 auto;
    padding: 4px;
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 6px;
}
.wc-qr-tip {
    font-size: 11px;
    color: #7a8a99;
    margin-top: 4px;
}

/* 底部：发证信息 + 印章 */
.wc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px 16px;
    border-top: 1px dashed #d8e2ec;
    font-size: 12px;
    color: #7a8a99;
}
.wc-seal {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #c0392b;
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    transform: rotate(-12deg);
    line-height: 1.2;
    opacity: 0.85;
}

/* 状态标记（已吊销） */
.wc-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.wc-status.active { background: #e6f7ee; color: #1a9d5a; }
.wc-status.revoked { background: #fdeaea; color: #c0392b; }

/* 操作按钮组（不打印） */
.wc-actions {
    text-align: center;
    margin: 16px 0;
}

/* ============================ 打印样式 ============================ */
@media print {
    /* 仅当页面标记了 bsr-wc-print 时才隐藏站点外壳，避免影响其它后台页面打印 */
    body.bsr-wc-print .site-header,
    body.bsr-wc-print .site-footer,
    body.bsr-wc-print .duty-card-fixed,
    body.bsr-wc-print .layui-header,
    body.bsr-wc-print .bsr-header,
    body.bsr-wc-print .bsr-sidebar,
    body.bsr-wc-print .layui-side,
    body.bsr-wc-print .bsr-card-header,
    body.bsr-wc-print .bsr-page-actions,
    body.bsr-wc-print .bsr-no-print { display: none !important; }

    body.bsr-wc-print .layui-body {
        position: static !important;
        left: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    body.bsr-wc-print .bsr-card {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
    }
    body.bsr-wc-print .main-content { padding: 0 !important; }

    @page { margin: 10mm; }
    html, body { background: #fff !important; }
    .wc-wrap { padding: 0 !important; }
    .wc-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}

/* 小屏自适应 */
@media (max-width: 420px) {
    .wc-card { width: 100%; max-width: 360px; }
}

/* 模板渲染卡片（由 WorkCardRenderer 生成，覆盖默认固定版式尺寸） */
.wc-card-tpl {
    box-shadow: 0 6px 24px rgba(10, 61, 98, 0.18);
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    color: #1a2b3c;
}
.wc-card-tpl .wc-el {
    box-sizing: border-box;
}
.wc-card-tpl .wc-qr-box {
    width: 100%;
    height: 100%;
}
@media print {
    .wc-card-tpl {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
