.crm-documents-dialog{position:fixed;inset:0;margin:auto;max-height:90vh;overflow:auto;max-width:760px;width:calc(100% - 48px);box-sizing:border-box;border:1px solid #b9b8b0;border-radius:12px;padding:24px;background:var(--bg,#fff);color:var(--text,#202828);font:14px/1.5 system-ui,sans-serif}
.crm-documents-dialog::backdrop{background:#10202080}
.crm-documents-dialog h2{font-size:20px;margin-top:0}
.crm-documents-dialog button,.crm-documents-dialog a{display:inline-block;min-height:44px;box-sizing:border-box;padding:8px 12px;margin:4px;border:1px solid #888;border-radius:6px;background:#f6f4ee;color:#163c36;cursor:pointer}
.crm-document-close{position:sticky;top:0;z-index:2;float:right}
.crm-documents-dialog button:disabled{opacity:.6;cursor:wait}
.crm-documents-dialog button:focus-visible,.crm-documents-dialog summary:focus-visible{outline:3px solid #087d7a;outline-offset:2px}
.crm-documents-dialog details{margin:16px 0}
.crm-document-row{border-top:1px solid #b9b8b0;padding:10px 0}
.crm-document-row p{margin:6px 0}
.crm-document-actions{display:flex;flex-wrap:wrap;gap:4px}
.crm-document-row [role=status]{font-size:13px;min-height:1.5em}
.crm-documents-dialog.has-preview{max-width:1200px}
.crm-document-preview h3{font-size:15px}
.crm-document-preview{min-width:0}
@media(max-width:600px){.crm-documents-dialog{width:calc(100% - 16px);padding:14px;max-height:95vh}.crm-document-actions{flex-direction:column}.crm-document-actions button{margin:2px 0;min-height:44px}}
.crm-documents-dialog.crm-document-reader{width:calc(100% - 16px);max-width:none;height:calc(100dvh - 16px);max-height:none;padding:8px;overflow:hidden}
.crm-document-reader[open]{display:flex;flex-direction:column;gap:4px}
.crm-document-header{--um-text-title:17px;--um-text-body:14px;display:flex;align-items:center;gap:8px;position:relative;flex:none;min-width:0;font-size:14px!important}
.crm-document-header h2{flex:1;min-width:0;margin:0;font-size:17px;line-height:1.25;overflow-wrap:anywhere}
.crm-document-header .crm-document-close{position:static;float:none;flex:none;margin:0}
.crm-document-options{flex:none;margin:0!important}
.crm-document-options>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:0 10px;border:1px solid #888;border-radius:6px;background:#f6f4ee;color:#163c36;box-sizing:border-box}
.crm-document-options>summary::after{content:' ▾';margin-left:4px}
.crm-document-options-panel{position:absolute;right:0;top:calc(100% + 4px);z-index:3;box-sizing:border-box;width:min(620px,100%);max-height:calc(100dvh - 90px);overflow:auto;padding:12px;background:var(--bg,#fff);border:1px solid #b9b8b0;border-radius:8px;box-shadow:0 4px 16px #0003}
.crm-document-reader .crm-document-preview{flex:1;min-height:0;display:flex;flex-direction:column}
.crm-document-reader .crm-document-preview[hidden]{display:none}
.crm-document-reader .crm-document-preview h3{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}
.crm-document-reader .crm-document-preview>div{flex:1;min-height:0;display:flex;flex-direction:column}
.crm-document-reader .document-pdf-toolbar{--um-text-body:14px;font-size:14px!important}
@media(max-width:600px){.crm-documents-dialog.crm-document-reader{width:calc(100% - 8px);height:calc(100dvh - 8px);padding:4px}.crm-document-header{--um-text-title:13px;--um-text-body:12px;gap:4px;font-size:12px!important}.crm-document-header h2{font-size:13px}.crm-document-header button,.crm-document-options>summary{font-size:12px;padding:6px}.crm-document-options-panel{width:100%}.crm-document-reader .crm-document-actions{flex-direction:row}}
