.pdfjs-viewer {
    width: 100%;
}

.pdfjs-toolbar {
    position: sticky;
    top: 72px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pdfjs-toolbar-main,
.pdfjs-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pdfjs-toolbar-main strong {
    color: #303133;
    font-size: 14px;
}

.pdfjs-toolbar-main span,
.pdfjs-toolbar-actions span {
    color: #909399;
    font-size: 13px;
}

.pdfjs-toolbar-actions button {
    width: 30px;
    height: 30px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #303133;
    background: #fff;
    cursor: pointer;
}

.pdfjs-toolbar-actions button:hover {
    color: #409eff;
    border-color: #409eff;
}

.pdfjs-pages {
    display: grid;
    gap: 18px;
    justify-items: center;
    min-height: 420px;
}

.pdfjs-page {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 14px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.12);
}

.pdfjs-page canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
    border: 1px solid #eef0f4;
    background: #fff;
}

.pdfjs-page-label {
    margin: 0 0 10px;
    color: #909399;
    font-size: 12px;
    text-align: center;
}

.pdfjs-loading {
    min-height: 260px;
    display: grid;
    place-items: center;
    color: #909399;
}

.pdfjs-pagination {
    width: fit-content;
    max-width: 100%;
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: minmax(86px, auto) minmax(98px, auto) minmax(86px, auto);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #dcdfe6;
    border-radius: 5px;
    background: #fff;
}

.pdfjs-pagination button,
.pdfjs-page-number {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    color: #303133;
    background: #fff;
    font-size: 14px;
}

.pdfjs-pagination button {
    border: 0;
    cursor: pointer;
}

.pdfjs-pagination button + .pdfjs-page-number,
.pdfjs-page-number + button {
    border-left: 1px solid #dcdfe6;
}

.pdfjs-pagination button:hover:not(:disabled) {
    color: #409eff;
    background: #f5f9ff;
}

.pdfjs-pagination button:disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}

.pdfjs-page-number {
    color: #909399;
}

.pdfjs-page-number strong {
    color: #606266;
    font-weight: 500;
}

@media (max-width: 720px) {
    .pdfjs-toolbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .pdfjs-page {
        padding: 8px;
    }
}
