.document-preview-dialog { width: min(1060px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); box-sizing: border-box; border: 1px solid #d8e3ed; border-radius: 18px; padding: 24px; color: #243e56; background: #fff; box-shadow: 0 24px 100px #14344d40; }
.document-preview-dialog::backdrop { background: #102e48a8; }
.document-preview-header, .document-preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.document-preview-header { justify-content: space-between; margin-bottom: 18px; }
.document-preview-header h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 22px; }
.document-preview-header button, .document-preview-controls button { min-height: 44px; white-space: normal; }
.document-preview { min-width: 0; }
.document-preview-controls { padding: 12px; border: 1px solid #dce6ef; border-radius: 10px; background: #f6f9fc; }
.document-preview-page-label { color: #244f74; font-size: 14px; }
.document-preview-status, .document-preview-note { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; color: #526e85; }
.document-preview-status { min-height: 24px; margin: 12px 0; }
.document-preview-note { margin: 10px 0 0; }
.document-preview-viewport { min-width: 0; min-height: 240px; max-height: 64dvh; overflow: auto; background: #eaf0f5; border: 1px solid #dce6ef; border-radius: 8px; padding: 10px; }
.document-preview-image { display: block; width: 100%; height: auto; margin: 0 auto; background: white; box-shadow: 0 2px 10px #213e5a20; }
.document-preview-viewport.is-actual-size .document-preview-image { width: auto; max-width: none; margin: 0; }
@media (max-width: 640px) {
 .document-preview-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }
 .document-preview-header { align-items: flex-start; }
 .document-preview-header h2 { flex: 1; font-size: 20px; }
 .document-preview-controls { gap: 8px; padding: 8px; }
 .document-preview-controls button { padding-left: 10px; padding-right: 10px; }
 .document-preview-page-label { flex: 1; text-align: center; }
 .document-preview-viewport { padding: 6px; max-height: 60dvh; }
}
