/* 预览/打印对话框（统一管理，避免页面零散样式） */
.erp-print-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9998;
}
.erp-print-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, 96vw);
    height: 86vh;
    max-height: 92vh;
    background: #fff;
    border-radius: 10px;
    z-index: 9999;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.erp-print-dialog.is-a4 {
    width: min(210mm, 96vw);
}
.erp-print-dialog-head {
    flex: 0 0 auto;
    padding: 14px 18px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.erp-print-dialog-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    line-height: 1.4;
}
.erp-print-dialog-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: #909399;
}
.erp-print-icon-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #909399;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.erp-print-icon-btn:hover {
    background: #f2f6fc;
    color: #409eff;
}
.erp-print-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 10px 18px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafcff;
    font-size: 13px;
    color: #606266;
}
.erp-print-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.erp-print-toolbar select,
.erp-print-toolbar input {
    height: 30px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 8px;
    color: #303133;
    background: #fff;
    outline: none;
}
.erp-print-toolbar input {
    width: 62px;
}
.erp-print-toolbar select:focus,
.erp-print-toolbar input:focus {
    border-color: #409eff;
}
.erp-print-printer-label select {
    min-width: 200px;
    max-width: 260px;
}
.erp-print-status {
    margin-left: auto;
    color: #909399;
    font-size: 12px;
}
.erp-print-preview-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #f0f2f5;
    overflow: hidden;
}
.erp-print-preview-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.erp-print-dialog-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid #ebeef5;
}
.erp-print-hint {
    font-size: 12px;
    color: #909399;
    line-height: 1.4;
}
.erp-print-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.erp-print-btn {
    height: 32px;
    padding: 0 18px;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.erp-print-btn:hover {
    border-color: #c6e2ff;
    color: #409eff;
    background: #ecf5ff;
}
.erp-print-btn:disabled {
    opacity: .6;
    cursor: wait;
}
.erp-print-btn--primary {
    border-color: #409eff;
    background: #409eff;
    color: #fff;
}
.erp-print-btn--primary:hover {
    border-color: #66b1ff;
    background: #66b1ff;
    color: #fff;
}
.erp-print-btn--ghost {
    background: #fff;
}
@media (max-width: 768px) {
    .erp-print-dialog {
        width: 96vw;
        height: 90vh;
    }
    .erp-print-toolbar {
        gap: 8px 12px;
        padding: 8px 12px;
    }
    .erp-print-printer-label select {
        min-width: 140px;
        max-width: 180px;
    }
    .erp-print-status {
        width: 100%;
        margin-left: 0;
    }
    .erp-print-dialog-foot {
        align-items: flex-start;
        flex-direction: column;
    }
    .erp-print-hint {
        display: none;
    }
    .erp-print-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
