/* Scoped to the document reader: shared controls and financial forms stay unchanged. */
#documentImportDialog{width:min(1080px,calc(100vw - 40px));max-width:1080px;padding:24px;max-height:calc(100dvh - 40px)}
#documentImportDialog::backdrop{background:rgba(10,15,30,.45)}
#documentImportDialog .document-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
#documentImportDialog .document-head h2{margin:0}
#documentImportDialog .document-head .btn{width:34px;height:34px;padding:6px}
#documentImportDialog .document-upload{display:flex;align-items:center;gap:10px;padding:12px;border:1px dashed #94A3B8;border-radius:10px;background:#f5f8fc}
#documentImportDialog .document-upload input{min-width:0;flex:1;font-size:13px}
#documentImportDialog .document-upload .btn{flex-shrink:0}
#documentImportDialog .document-review{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:24px;margin-top:16px}
#documentImportDialog .document-source{min-width:0;background:#f5f8fc;border:1px solid #E2E8F0;border-radius:10px;padding:12px;align-self:start}
#documentImportDialog .document-source img{display:block;width:100%;height:auto;max-height:440px;object-fit:contain;background:white;border-radius:5px}
#documentImportDialog .document-source strong{display:block;overflow-wrap:anywhere;font-size:13px;margin-bottom:6px}
#documentImportDialog .document-source pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;font:12px/1.6 system-ui;color:#1B2A41}
#documentImportDialog summary{font-size:12px;cursor:pointer;color:#52657f;padding:10px 0}
#documentImportDialog .form{gap:12px;max-width:none;align-content:start}
#documentImportDialog .form>.full{grid-column:1/-1}
#documentImportDialog #documentPreviewToggle{display:none}
#documentImportDialog .form-actions{bottom:0;margin-bottom:0;flex-wrap:nowrap;background:white}
#documentImportDialog .form>div{min-width:0}
#documentImportDialog .form :is(input,select,textarea){max-width:100%;min-width:0}
#documentImportDialog .form textarea{min-height:64px;height:64px;resize:vertical}
#documentImportDialog .document-warnings{border-left:3px solid #d97706;padding:8px 12px;background:#fffbeb;color:#854d0e;font-size:12px;line-height:1.5;margin:12px 0}
#documentImportDialog #documentDuplicates{color:#b45309;font-size:12px;line-height:1.5}
#documentImportDialog .document-confirm{display:flex;gap:9px;align-items:flex-start;color:#1B2A41;font-size:12px;line-height:1.5}
#documentImportDialog .document-confirm input{width:16px;height:16px;flex-shrink:0;margin-top:1px}
#documentImportDialog #documentValidation{font-size:12px;line-height:1.5;color:#52657f;margin:0}
@media(max-width:760px){
 #documentImportDialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}
 #documentImportDialog .document-review{grid-template-columns:minmax(0,1fr);gap:14px}
 #documentImportDialog .document-source img{max-height:180px}
 #documentImportDialog .document-source:not(.expanded) img{display:none}
 #documentImportDialog #documentPreviewToggle{display:inline-flex;height:32px;min-height:32px;margin:4px 0}
 #documentImportDialog #documentPageNote{display:none}
 #documentImportDialog .document-upload{flex-wrap:wrap}
 #documentImportDialog .document-upload input{flex-basis:100%}
 #documentImportDialog .form{grid-template-columns:repeat(2,minmax(0,1fr))}
 #documentImportDialog .form-actions .btn{flex:1;font-size:12px;padding:0 10px}
}
