.pdfmp-page {
    padding: 0;
    min-height: 100%;
    background: #f6f7fb;
}

/* ===== banner2 ===== */
.pdfmp-banner {
    background: #ffffff;
    border: 1px solid #dbe4f3;
    border-bottom: none;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.pdfmp-banner__slogan {
    font-size: 28px;
    line-height: 1.4;
    font-weight: 700;
    color: #1e1e1e;
    letter-spacing: 1px;
    text-align: center;
}

/* ===== 通用区块 ===== */
.pdfmp-block {
    background: #ffffff;
    border: 1px solid #dbe4f3;
    padding: 18px 20px;
    box-sizing: border-box;
}

.pdfmp-block + .pdfmp-block {
    border-top: none;
}

.pdfmp-block__title {
    font-size: 18px;
    line-height: 1.5;
    color: #222;
    text-align: center;
    margin-bottom: 14px;
}

/* ===== 预览区 ===== */
.pdfmp-block--preview {
    min-height: 560px;
    text-align: center;
}

.pdfmp-preview-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdfmp-preview-sheet {
    background: #ffffff;
    border: 1px solid #dfe6d8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.pdfmp-preview-sheet--portrait {
    width: 560px;
    height: 790px;
    max-height: calc(100vh - 280px);
}

.pdfmp-preview-sheet--landscape {
    width: 790px;
    height: 560px;
    max-width: 100%;
}

.pdfmp-preview-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.pdfmp-preview-header {
    position: absolute;
    top: 14px;
    left: 70px;
    right: 70px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.pdfmp-preview-safe {
    position: absolute;
    overflow: hidden;
    box-sizing: border-box;
}

.pdfmp-preview-guides {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.pdfmp-preview-guide {
    position: absolute;
    background: transparent;
}

.pdfmp-preview-guide--v {
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed #8d8d8d;
}

.pdfmp-preview-guide--h {
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed #8d8d8d;
}

.pdfmp-preview-grid {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 10px;
    align-items: center;
    justify-items: center;
    z-index: 2;
}

.pdfmp-preview-card {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    box-sizing: border-box;
}


.pdfmp-preview-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    box-sizing: border-box;
}

.pdfmp-preview-card img.is-bordered {
    border: 1px solid rgba(0, 0, 0, 0.32);
}

.pdfmp-preview-page-number {
    position: absolute;
    bottom: 12px;
    min-height: 20px;
    font-size: 14px;
    line-height: 1.2;
    color: #333333;
    z-index: 3;
    pointer-events: none;
}

.pdfmp-preview-page-number--hidden {
    display: none;
}

.pdfmp-preview-page-number--left {
    left: 18px;
    text-align: left;
}

.pdfmp-preview-page-number--center {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.pdfmp-preview-page-number--right {
    right: 18px;
    text-align: right;
}

/* ===== 设置区 ===== */
.pdfmp-block--settings {
    overflow-x: auto;
}

.pdfmp-settings-row {
    display: grid;
    gap: 10px 12px;
    align-items: center;
}

.pdfmp-settings-row + .pdfmp-settings-row {
    margin-top: 10px;
}

.pdfmp-settings-row--top {
    grid-template-columns: 1fr 1fr 1.7fr 0.82fr 0.82fr 0.82fr 0.82fr;
}

.pdfmp-settings-row--bottom {
    grid-template-columns: 1.1fr 1.6fr 3fr;
}

.pdfmp-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.pdfmp-item__label {
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}

.pdfmp-item__control {
    width: 100%;
    min-width: 0;
    height: 38px;
    border: 1px solid #cfe0c9;
    background: #dff0d7;
    padding: 0 10px;
    font-size: 14px;
    color: #1f1f1f;
    outline: none;
    box-sizing: border-box;
}

.pdfmp-item__compound {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdfmp-item__compound .pdfmp-item__control {
    flex: 1;
}

.pdfmp-item__compound em {
    flex-shrink: 0;
    font-style: normal;
    color: #444;
    font-size: 14px;
}

.pdfmp-item__checkwrap {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdfmp-item__checkwrap span {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

.pdfmp-margins {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.pdfmp-margins__title {
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

/* ===== 已上传文件区 ===== */
.pdfmp-error {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fff4f4;
    border: 1px solid #f1c8c8;
    color: #c52828;
    font-size: 15px;
    line-height: 1.7;
}

.pdfmp-files-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.pdfmp-files-head__summary {
    font-size: 16px;
    line-height: 1.8;
    color: #202020;
}

.pdfmp-files-head__action {
    flex-shrink: 0;
}

.pdfmp-files-head__action .tool-btn {
    min-width: 210px;
    height: 62px;
    font-size: 20px;
}

.pdfmp-files-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 18px;
    align-items: start;
}

.pdfmp-table-wrap {
    min-width: 0;
}

.pdfmp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pdfmp-table th,
.pdfmp-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf1f6;
    font-size: 15px;
    color: #1f1f1f;
    text-align: center;
    vertical-align: middle;
}

.pdfmp-table th {
    font-size: 16px;
    font-weight: 700;
}

.pdfmp-table__name {
    text-align: left !important;
    word-break: break-all;
}

.pdfmp-table tbody tr:hover {
    background: #fafcff;
}

.pdfmp-table__empty {
    text-align: center !important;
    color: #888;
    padding: 24px 0 !important;
}

.pdfmp-ops {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdfmp-ops__btn {
    height: 42px;
    border: none;
    border-radius: 18px;
    background: #b9dcbc;
    color: #17311a;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 弹窗 ===== */
.pdfmp-modal {
    width: 860px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.pdfmp-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pdfmp-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
}

.pdfmp-modal__body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    background: #fafbf8;
    border: 1px solid #e4e9de;
}

.pdfmp-modal__body img {
    max-width: 100%;
    max-height: 620px;
    object-fit: contain;
}

/* ===== 响应式 ===== */
@media (max-width: 1500px) {
    .pdfmp-preview-sheet--portrait {
        width: 500px;
        height: 705px;
    }

    .pdfmp-preview-sheet--landscape {
        width: 700px;
        height: 500px;
    }

    .pdfmp-settings-row--top {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pdfmp-settings-row--bottom {
        grid-template-columns: 1fr 1fr;
    }

    .pdfmp-margins {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 1200px) {
    .pdfmp-files-body {
        grid-template-columns: 1fr;
    }

    .pdfmp-ops {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pdfmp-ops__btn {
        min-width: 120px;
    }
}

@media (max-width: 1100px) {
    .pdfmp-preview-sheet--portrait,
    .pdfmp-preview-sheet--landscape {
        width: 100%;
        max-width: 700px;
        height: auto;
        aspect-ratio: 1 / 1.414;
    }

    .pdfmp-settings-row--top,
    .pdfmp-settings-row--bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pdfmp-margins {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .pdfmp-files-head {
        flex-direction: column;
        align-items: stretch;
    }

    .pdfmp-files-head__action .tool-btn {
        width: 100%;
    }

    .pdfmp-settings-row--top,
    .pdfmp-settings-row--bottom {
        grid-template-columns: 1fr;
    }

    .pdfmp-item,
    .pdfmp-margins {
        flex-wrap: wrap;
    }

    .pdfmp-table th,
    .pdfmp-table td {
        font-size: 13px;
        padding: 6px 6px;
    }
}

.pdfmp-invalid-tag{
    display:inline-block;
    margin-left:8px;
    padding:1px 8px;
    border-radius:10px;
    background:#fdeaea;
    color:#bb2d2d;
    font-size:12px;
    line-height:20px;
    vertical-align:middle
}

.pdfmp-invalid-text{
    margin-top:4px;
    font-size:12px;
    color:#bb2d2d;
    line-height:1.5
}

.pdfmp-invalid-radio{
    font-size:12px;
    color:#999
}

.pdfmp-result-preview-panel {
    margin-top: 20px;
}

.pdfmp-result-preview-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pdfmp-result-preview-frame-wrap {
    width: 100%;
    min-height: 820px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fbfd;
}

.pdfmp-result-preview-frame {
    width: 100%;
    height: 820px;
    border: 0;
    display: block;
    background: #fff;
}


.pdfmp-result-preview-panel {
    margin-top: 20px;
}

.pdfmp-result-preview-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.pdfmp-result-preview-frame-wrap {
    width: 100%;
    min-height: 820px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fbfd;
}

.pdfmp-result-preview-frame {
    width: 100%;
    height: 820px;
    border: 0;
    display: block;
    background: #fff;
}