/**
 * 前端开票申请页面 - 样式文件
 * 
 * @author 呆窝云
 * @email service@dwoyun.com
 * @website https://dwoyun.com
 * @date 2026-08-03
 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    color: #303133;
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
img { border: 0; }
input, textarea, select { font-family: inherit; }

/* 容器 */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 顶部 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #409eff, #5ab1ff);
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
.brand-name { font-size: 17px; font-weight: 600; color: #303133; }
.nav-links { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px;
    border-radius: 4px;
    color: #606266;
    font-size: 14px;
    transition: all 0.2s;
}
.nav-link:hover { background: #ecf5ff; color: #409eff; }

/* Hero */
.main-wrapper { padding: 24px 16px 40px; }
.hero-banner {
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
    color: #fff;
    padding: 36px 28px;
    border-radius: 10px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.hero-title { font-size: 26px; font-weight: 600; margin-bottom: 12px; }
.hero-desc { font-size: 14px; opacity: 0.92; margin-bottom: 18px; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.card-header h3 { font-size: 16px; font-weight: 600; color: #303133; }
.card-sub { color: #909399; font-size: 13px; }
.close-btn {
    font-size: 22px; line-height: 1;
    color: #909399;
    padding: 0 8px;
}
.close-btn:hover { color: #f56c6c; }

/* 表单 */
.form-wrapper { padding: 20px 24px 28px; }
.form-row { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 14px;
    color: #606266;
    margin-bottom: 6px;
    font-weight: 500;
}
.required { color: #f56c6c; margin-right: 3px; }
.text-muted { color: #909399; font-size: 12px; font-weight: 400; }

.form-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #303133;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64,158,255,0.15);
}
.form-input.error {
    border-color: #f56c6c;
    box-shadow: 0 0 0 3px rgba(245,108,108,0.15);
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.row-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.radio-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.radio-item input[type=radio] { cursor: pointer; accent-color: #409eff; }
.radio-item:hover { border-color: #409eff; color: #409eff; }
.radio-item:has(input:checked) {
    border-color: #409eff;
    background: #ecf5ff;
    color: #409eff;
    font-weight: 500;
}

.field-tip { color: #909399; font-size: 12px; margin-top: 6px; }

/* 验证码 */
.captcha-wrapper {
    display: flex; align-items: center; gap: 10px;
    height: 40px;
}
#captchaImg {
    height: 40px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    background: #fafafa;
    vertical-align: middle;
}
.captcha-refresh {
    font-size: 12px; color: #409eff;
}
.captcha-refresh:hover { text-decoration: underline; }

/* 分隔线 */
.divider {
    position: relative;
    text-align: center;
    margin: 12px 0 24px;
}
.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ebeef5;
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.divider span {
    display: inline-block;
    padding: 0 18px;
    color: #909399;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    min-height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    line-height: 1.2;
    white-space: nowrap;
}
.btn-primary {
    background: #409eff;
    color: #fff;
}
.btn-primary:hover { background: #66b1ff; }
.btn-primary:active { background: #3a8ee6; }
.btn-primary:disabled {
    background: #a0cfff; cursor: not-allowed;
}
.btn-default {
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
}
.btn-default:hover {
    color: #409eff;
    border-color: #409eff;
    background: #ecf5ff;
}
.btn-lg { min-height: 46px; font-size: 16px; padding: 0 28px; }
.btn-block { width: 100%; }

.submit-row { margin-top: 28px; }
.form-tip {
    text-align: center;
    color: #909399;
    font-size: 12px;
    margin-top: 12px;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部 */
.site-footer {
    background: #fff;
    border-top: 1px solid #ebeef5;
    padding: 28px 0;
    margin-top: 24px;
}
.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.footer-col h5 {
    color: #303133;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}
.footer-col p {
    color: #606266;
    font-size: 13px;
    margin-bottom: 6px;
}
.copyright-col {
    color: #909399;
    text-align: right;
}

/* 模态框 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}
.modal-dialog {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #ebeef5;
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}
.modal-body {
    padding: 24px 20px;
    color: #606266;
    font-size: 14px;
}
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #ebeef5;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast */
.toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    z-index: 10000;
    font-size: 14px;
    animation: toastIn 0.25s ease-out;
    max-width: 86%;
    text-align: center;
}
.toast.error { background: #f56c6c; }
.toast.success { background: #67c23a; }
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 查询结果 */
.query-result {
    margin-top: 18px;
    padding: 16px;
    background: #f4f4f5;
    border-radius: 6px;
    font-size: 13px;
    color: #303133;
    line-height: 2;
}
.qr-label { display: inline-block; width: 110px; color: #909399; }
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.status-badge.s0 { background: #fdf6ec; color: #e6a23c; }
.status-badge.s1 { background: #f0f9eb; color: #67c23a; }
.status-badge.s2 { background: #fef0f0; color: #f56c6c; }

/* 成功提示卡 */
.success-box {
    text-align: center;
    padding: 8px 0;
}
.success-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #67c23a;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 700;
}
.apply-no {
    background: #f4f4f5;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    margin: 12px 0 8px;
    letter-spacing: 0.5px;
    word-break: break-all;
}
.apply-tip { font-size: 13px; color: #606266; }
.success-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 字段错误 */
.field-error {
    color: #f56c6c;
    font-size: 12px;
    margin-top: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-banner { padding: 26px 20px; border-radius: 8px; }
    .hero-title { font-size: 20px; }
    .card-header { padding: 14px 18px; }
    .form-wrapper { padding: 16px; }
    .row-grid-2 { grid-template-columns: 1fr; }
    .nav-inner { height: 56px; }
    .brand-name { font-size: 15px; }
    .nav-links .nav-link { padding: 6px 10px; font-size: 13px; }
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .copyright-col { text-align: left; }
    .hero-tags { gap: 6px; }
    .tag { font-size: 11px; padding: 3px 10px; }
}

@media (max-width: 480px) {
    .radio-group .radio-item { width: 100%; }
    .captcha-wrapper { flex-wrap: wrap; height: auto; }
}

/* ================================================
   企业名称自动补全（购方名称下拉建议列表）
   ================================================ */

/* 输入框外层相对定位容器：下拉列表以它为参照定位 */
.autocomplete-wrap {
    position: relative;
    width: 100%;
}

/* 下拉建议列表 */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 500;
    margin-top: 4px;
    padding: 6px 0;
    max-height: 340px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
    list-style: none;
    /* 兼容旧浏览器，避免无列表时留白 */
    display: none;
}

/* 单个建议项 */
.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f5f9ff;
    border-left-color: #409eff;
}

/* 建议项标题（企业名称） */
.ac-title {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    word-break: break-all;
    margin-bottom: 4px;
}

/* 建议项副标题（税号） */
.ac-sub {
    font-size: 12px;
    color: #909399;
    word-break: break-all;
    letter-spacing: 0.2px;
}

/* 关键词高亮（与主色一致，背景淡） */
.ac-title mark,
.ac-sub mark {
    background: transparent;
    color: #409eff;
    font-weight: 600;
    padding: 0;
    /* 去除mark元素默认黄色背景 */
    background-color: transparent;
}

/* 滚动条美化（仅支持webkit浏览器） */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}
.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #dcdfe6;
    border-radius: 3px;
}
.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #c0c4cc;
}
.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

/* 移动端响应式：下拉列表轻微内缩，避免超出屏幕 */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 280px;
        margin-top: 2px;
        border-radius: 4px;
    }
    .autocomplete-item {
        padding: 8px 12px;
    }
    .ac-title { font-size: 13px; }
    .ac-sub   { font-size: 11px; }
}

/* ================================================================
   申请进度查询窗口优化（新版：模态弹窗 + 入口卡 + 结构化结果）
   ================================================================ */

/* 1. 页面内查询入口卡（放在hero-banner下方、申请表单上方） */
.query-entry-card {
    background: linear-gradient(135deg, #ecf5ff 0%, #f0f9ff 100%);
    border: 1px solid #d9ecff;
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(64,158,255,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.query-entry-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(64,158,255,0.12);
}
.query-entry-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 260px;
}
.qe-icon {
    width: 48px; height: 48px;
    background: #409eff;
    color: #fff;
    border-radius: 12px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qe-title {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 600;
    color: #303133;
}
.qe-desc {
    margin: 0;
    font-size: 13px;
    color: #606266;
    line-height: 1.5;
}
@media (max-width: 560px) {
    .query-entry-card { padding: 16px; }
    .qe-icon { width: 40px; height: 40px; font-size: 20px; }
    .qe-title { font-size: 15px; }
    .qe-desc { font-size: 12px; }
}

/* 2. 查询弹窗（与resultModal风格一致，但更宽） */
.query-modal-mask { background: rgba(0, 0, 0, 0.5); }
.query-modal {
    width: 640px;
    max-width: 94vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.query-modal .modal-header {
    border-bottom: 1px solid #ebeef5;
    padding: 16px 24px;
}
.query-modal .modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}
.query-modal .close-btn {
    font-size: 24px;
    line-height: 1;
    color: #909399;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.query-modal .close-btn:hover {
    background: #f4f4f5;
    color: #303133;
}

/* 3. 输入区 */
.qm-input-wrap { margin-bottom: 8px; }
.qm-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #606266;
    margin-bottom: 8px;
}
.qm-input-row { position: relative; }
.qm-input {
    padding-right: 36px !important;
    height: 44px;
    font-size: 15px;
}
.qm-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #c0c4cc;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    transition: background 0.15s ease, color 0.15s ease;
}
.qm-clear-btn:hover {
    background: #f4f4f5;
    color: #606266;
}
.qm-hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 14px;
}
.qm-hint {
    font-size: 12px;
    color: #909399;
}
.qm-history {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.qm-history-title {
    color: #909399;
}
.qm-history-item {
    padding: 3px 10px;
    background: #f4f4f5;
    color: #606266;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: Consolas, Monaco, monospace;
}
.qm-history-item:hover {
    background: #409eff;
    color: #fff;
}
.qm-search-btn {
    height: 46px;
    font-size: 15px;
    position: relative;
}
.is-loading {
    opacity: 0.8;
    cursor: not-allowed;
}

/* 4. 结果区 */
.qm-result { margin-top: 20px; }

/* 4.1 顶部状态头 */
.qm-status-header {
    padding: 18px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.qm-status-header.qm-st-wait {
    background: linear-gradient(135deg, #fdf6ec 0%, #faecd8 100%);
    border: 1px solid #faecd8;
}
.qm-status-header.qm-st-done {
    background: linear-gradient(135deg, #f0f9eb 0%, #e1f3d8 100%);
    border: 1px solid #e1f3d8;
}
.qm-status-header.qm-st-reject {
    background: linear-gradient(135deg, #fef0f0 0%, #fde2e2 100%);
    border: 1px solid #fde2e2;
}
.qm-status-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.75);
}
.qm-st-wait   .qm-status-icon { color: #e6a23c; }
.qm-st-done   .qm-status-icon { color: #67c23a; }
.qm-st-reject .qm-status-icon { color: #f56c6c; }
.qm-status-info { flex: 1; min-width: 0; }
.qm-status-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #303133;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.qm-status-desc {
    font-size: 13px;
    color: #606266;
    line-height: 1.6;
}

/* 4.2 三步流程条 */
.qm-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 12px 22px;
}
.qm-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e4e7ed;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e4e7ed;
    transition: all 0.25s ease;
}
.qm-step.active .step-dot {
    background: #409eff;
    box-shadow: 0 0 0 2px #409eff;
}
.qm-step.reject .step-dot {
    background: #f56c6c;
    box-shadow: 0 0 0 2px #f56c6c;
}
.step-label {
    font-size: 12px;
    color: #909399;
    white-space: nowrap;
}
.qm-step.active .step-label { color: #409eff; font-weight: 500; }
.qm-step.reject .step-label { color: #f56c6c; font-weight: 500; }
.qm-step-line {
    flex: 1;
    height: 2px;
    background: #e4e7ed;
    margin-top: 10px;
    min-width: 24px;
    transition: background 0.25s ease;
}
.qm-step-line.active { background: #409eff; }

/* 4.3 通用信息卡片 */
.qm-card {
    background: #ffffff;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.qm-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ebeef5;
}
.qm-kv {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.6;
}
.qm-kv .qm-k {
    width: 110px;
    color: #909399;
    flex-shrink: 0;
}
.qm-kv .qm-v {
    flex: 1;
    color: #303133;
    word-break: break-all;
}
.qm-kv .qm-sub {
    color: #909399;
    font-size: 12px;
    margin-left: 8px;
}
.qm-apply-no,
.qm-invoice-no {
    font-family: Consolas, Monaco, monospace;
    background: #f5f7fa;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
}
.qm-invoice-no {
    color: #67c23a;
    font-weight: 600;
}
.qm-amount {
    color: #f56c6c;
    font-weight: 600;
    font-size: 15px;
}

/* ---------- 4.3.1 可折叠信息卡片（基础/购方） ----------
 * - status=1 已完成时默认折叠，突出"发票信息/二维码交付"两张结果卡
 * - 其他状态（0=处理中 / 2=已驳回）默认展开
 * - 标题栏可点击切换，支持键盘 Tab 聚焦 + Enter/Space 展开
 */
.qm-card-foldable {
    padding: 0;
    overflow: hidden;
}
.qm-card-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease;
}
.qm-card-title-bar:hover {
    background: #f8fafc;
}
.qm-card-title-bar:focus {
    outline: 2px solid #93c5fd;
    outline-offset: -2px;
}
.qm-card-title.qm-title-inline {
    /* 覆盖原 .qm-card-title：去掉底部虚线 & 外边距，标题栏自行控制 */
    margin: 0;
    padding: 0;
    border-bottom: none;
    font-size: 14px;
}
.qm-card-toggle {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform .25s ease;
}
/* 使用 ::before / ::after 画两条交叉线（默认展开态 = 减号 "-"） */
.qm-card-toggle::before,
.qm-card-toggle::after {
    content: "";
    position: absolute;
    background: #64748b;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}
.qm-card-toggle::before {
    /* 横杠 */
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}
.qm-card-toggle::after {
    /* 竖杠（展开时存在；折叠时旋转 0 消失 → 变成"-"）→ 反过来说：折叠时是"+"，展开时竖杠透明度为 0
       为简化：默认折叠态 = "+"，展开 = 旋转。
       这里策略：默认加 .qm-card-foldable.is-collapsed 时 toggle 旋转 0 = "+"；
       未折叠时 rotate 使竖杠变平（透明度0） => 实际是：
       - 折叠态 .is-collapsed：显示 "+"
       - 展开态（默认）：显示 "-"
       实现：before 永远横杠(-的-)；after 永远竖杠；展开时after opacity=0,折叠时after opacity=1 */
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
}
.qm-card-body {
    padding: 0 18px 16px 18px;
    max-height: 4000px;
    overflow: hidden;
    transition: max-height .3s ease, opacity .25s ease, padding .25s ease;
    opacity: 1;
}
/* 折叠态：隐藏 body（加平滑动画）+ 图标变 "+" */
.qm-card-foldable.is-collapsed .qm-card-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}
.qm-card-foldable.is-collapsed .qm-card-toggle::after {
    opacity: 1; /* 折叠 = "+" */
}
.qm-card-foldable.is-collapsed .qm-card-toggle::before {
    opacity: 1;
}
/* 展开态（默认）：只显示横杠 = "-"，竖杠透明度为 0 */
.qm-card-foldable:not(.is-collapsed) .qm-card-toggle::after {
    opacity: 0;
}

/* 平板/手机：折叠卡的标题栏内边距收缩 */
@media (max-width: 640px) {
    .qm-card-title-bar { padding: 12px 14px; }
    .qm-card-body     { padding: 0 14px 14px 14px; }
}

/* 4.4 驳回原因卡 */
.qm-reject-card {
    background: #fef0f0;
    border: 1px solid #fbc4c4;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.qm-reject-title {
    font-size: 14px;
    font-weight: 600;
    color: #f56c6c;
    margin-bottom: 8px;
}
.qm-reject-text {
    font-size: 13px;
    color: #606266;
    line-height: 1.7;
    padding: 10px 12px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #f56c6c;
    margin-bottom: 12px;
    white-space: pre-wrap;
}
.qm-reject-btn { width: 100%; height: 40px; }

/* 4.5 发票信息卡 */
.qm-invoice-card {
    background: #f0f9eb;
    border: 1px solid #c2e7b0;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.qm-invoice-title {
    font-size: 14px;
    font-weight: 600;
    color: #67c23a;
    margin-bottom: 12px;
}

/* 4.6 错误卡片 */
.qm-error {
    text-align: center;
    padding: 24px 16px;
    background: #fef0f0;
    border: 1px solid #fbc4c4;
    border-radius: 8px;
}
.qm-error-icon {
    font-size: 40px;
    margin-bottom: 10px;
}
.qm-error-msg {
    font-size: 14px;
    color: #f56c6c;
    font-weight: 500;
    margin-bottom: 4px;
}
.qm-error-code {
    font-size: 12px;
    color: #909399;
    margin-bottom: 14px;
}
.qm-error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 4.7 操作按钮区 */
.qm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.qm-actions .btn {
    flex: 1;
    min-width: 140px;
    height: 42px;
}

/* 5. 查询弹窗响应式 */
@media (max-width: 640px) {
    .query-modal {
        width: 96vw;
        margin: 12px auto;
        max-height: 94vh;
        border-radius: 10px;
    }
    .query-modal .modal-header { padding: 12px 16px; }
    .query-modal .modal-body { padding: 14px 16px 18px; }

    .qm-status-header {
        padding: 14px;
        gap: 12px;
    }
    .qm-status-icon { width: 44px; height: 44px; font-size: 22px; }
    .qm-status-title { font-size: 15px; }
    .qm-status-desc  { font-size: 12px; }

    .qm-steps { margin: 0 4px 18px; }
    .step-label { font-size: 11px; }
    .step-dot { width: 16px; height: 16px; }
    .qm-step-line { margin-top: 8px; }

    .qm-card { padding: 12px 14px; }
    .qm-kv .qm-k { width: 84px; font-size: 12px; }
    .qm-kv .qm-v { font-size: 12px; }
    .qm-amount { font-size: 13px; }

    .qm-actions .btn { min-width: auto; height: 38px; font-size: 13px; }
}

@media (max-width: 400px) {
    .qm-kv {
        flex-direction: column;
        gap: 2px;
    }
    .qm-kv .qm-k { width: auto; }
}

/* ============================================================
 * 前台「申请进度查询」- 二维码交付卡片样式（复用 qm-card 做视觉统一）
 * ============================================================ */
.qr-card {
    border-left: 3px solid #0ea5e9;
}
.qr-card .qm-card-title {
    color: #0369a1;
}
.qr-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
}
.qr-thumb-wrap {
    position: relative;
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: zoom-in;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.qr-thumb-wrap:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 14px rgba(14,165,233,0.18);
    transform: translateY(-1px);
}
.qr-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    display: block;
}
.qr-zoom-hint {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
    color: #fff;
    font-size: 11px;
    padding: 18px 6px 4px;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}
.qr-actions {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.qr-tip {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 6px;
    padding: 8px 12px;
}
.qr-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.qr-btn-row .btn {
    min-width: 120px;
    flex: 0 0 auto;
}
.qr-url {
    font-size: 11px;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    word-break: break-all;
    line-height: 1.5;
    max-height: 70px;
    overflow: auto;
}

/* 二维码卡片：平板/手机端竖排 */
@media (max-width: 640px) {
    .qr-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }
    .qr-thumb-wrap {
        flex: 0 0 160px;
        width: 160px;
        height: 160px;
    }
    .qr-actions { width: 100%; align-items: stretch; }
    .qr-btn-row { justify-content: center; }
    .qr-tip { text-align: left; }
}

/* ============================================================
 * 全屏图片预览 Modal（二维码缩略图点击放大）
 * ============================================================ */
.img-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.img-preview-content {
    position: relative;
    z-index: 2;
    max-width: 96vw;
    max-height: 94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: imgPop .22s ease-out;
}
@keyframes imgPop {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.img-preview-img {
    max-width: 96vw;
    max-height: 94vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 60px rgba(0,0,0,.55);
    background: #fff;
}
.img-preview-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    transition: transform .2s, background .2s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.img-preview-close:hover {
    transform: rotate(90deg);
    background: #f87171;
    color: #fff;
}
@media (max-width: 640px) {
    .img-preview-close {
        top: -48px;
        right: 0;
        left: 0;
        margin: 0 auto;
    }
}
