.document-confidentiality {
    padding: 4px 7px;
    border: 1px solid #263746;
    border-top: 0;
    color: #374b5d;
    font-size: 9px;
}

.pdf-zoom-toolbar {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    padding: 5px;
    border: 1px solid #cbdce8;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 28px rgba(11, 60, 93, .22);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.pdf-zoom-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 38px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #e8f2f8;
    color: #07385a;
    font-weight: 900;
}

.pdf-zoom-toolbar .pdf-zoom-value { min-width: 62px; font-size: 12px; }
.pdf-zoom-toolbar .pdf-zoom-fit { font-size: 11px; }

@media (max-width: 760px) {
    .pdf-zoom-toolbar {
        bottom: calc(10px + env(safe-area-inset-bottom));
        max-width: calc(100% - 20px);
    }
}
/* PDF sits above document details and action dialogs. */
.pdf-viewer-backdrop{z-index:12000}
.pdf-viewer-shell{max-height:calc(100dvh - 32px)}
.pdf-viewer-frame[hidden]{display:none}
html[data-theme="dark"] .pdf-viewer-shell,html[data-theme="dark"] .pdf-viewer-body{background:var(--surface-muted)}
html[data-theme="dark"] .pdf-viewer-loading{background:var(--surface);color:var(--text-main)}
html[data-theme="dark"] .pdf-viewer-loading p{color:var(--text-muted)}
html[data-theme="dark"] .pdf-viewer-header .action-secondary{background:#e7f3fa;color:#07385a;border-color:#c3dce8}
.pdf-viewer-close{flex-shrink:0}
@media(max-width:700px){.pdf-viewer-shell{max-height:100dvh}}

/* Clean document preview restored: one scroll area, no native PDF toolbar. */
.pdf-clean-preview .pdf-viewer-shell{width:min(1360px,calc(100vw - 24px));height:calc(100dvh - 30px);max-height:calc(100dvh - 30px);background:#eef4f8}
.pdf-clean-preview .pdf-viewer-header{background:#fff;color:#07385a;padding:12px 16px;border-bottom:1px solid #d3e0ea}
.pdf-clean-preview .pdf-viewer-identity{min-width:0;flex:1}
.pdf-clean-preview .pdf-viewer-identity>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.pdf-clean-preview .pdf-viewer-identity strong{color:#07385a;font-size:18px}
.pdf-clean-preview .pdf-viewer-identity span{color:#60758b;font-size:12px}
.pdf-clean-preview .pdf-viewer-actions{flex-shrink:0}
.pdf-clean-preview .pdf-viewer-actions .action-primary span{color:#fff}
.pdf-clean-preview .pdf-viewer-actions .action-secondary span{color:#07385a}
.pdf-clean-preview .pdf-viewer-close{background:#e8f2f8;color:#07385a;border:0}
.pdf-clean-preview .pdf-viewer-body{display:flex;flex:1;min-height:0;padding:0;overflow:hidden;background:#eef4f8}
.pdf-clean-preview .pdf-print-frame{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:0}
.pdf-clean-preview [hidden]{display:none!important}
.pdf-clean-page{width:1050px;margin:0 0 20px;background:#fff;color:#07385a;box-shadow:0 12px 30px rgba(11,60,93,.12);overflow:hidden}
.pdf-clean-page canvas{display:block}
html[data-theme="dark"] .pdf-clean-preview .pdf-viewer-header{background:var(--surface)}
html[data-theme="dark"] .pdf-clean-preview .pdf-viewer-identity strong{color:var(--text-main)}
html[data-theme="dark"] .pdf-clean-preview .pdf-viewer-identity span{color:var(--text-muted)}
@media(max-width:700px){
 .pdf-clean-preview{padding:0}
 .pdf-clean-preview .pdf-viewer-shell{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
 .pdf-clean-preview .pdf-viewer-header{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;gap:8px;padding:10px}
 .pdf-clean-preview .pdf-viewer-identity{flex-basis:100%}
 .pdf-clean-preview .pdf-viewer-actions{width:100%;display:grid;grid-template-columns:1fr 1fr 42px;justify-content:normal}
}
