/* Keep the application header separate from the document editor's controls. */
#documentViewerModal.modal{z-index:1250!important;padding:24px;background:rgba(15,23,42,.48)}
#documentViewerModal .document-viewer-card{display:grid!important;grid-template-rows:auto minmax(0,1fr);width:min(1440px,calc(100vw - 48px))!important;max-width:none!important;height:calc(100dvh - 48px)!important;max-height:none!important;padding:0!important;margin:0;border-radius:16px!important;overflow:hidden!important;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.25)}
#documentViewerModal .dv18-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0!important;padding:12px 18px!important;background:#fff;border-bottom:1px solid #e4e9f0;position:relative;min-width:0}
#documentViewerModal .dv18-title{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
#documentViewerModal .dv18-title-text{display:flex;flex-direction:column;gap:3px;min-width:0}
#documentViewerModal .dv18-file-icon{display:grid;place-items:center;flex:0 0 40px;height:40px;font-size:23px;border-radius:10px;background:var(--zsc-accent-soft,#edf4ff)}
#documentViewerTitle{margin:0!important;font-size:16px!important;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#0f172a}
#documentViewerStatus{font-size:11px;line-height:1.5;color:#64748b}
#documentViewerModal .dv18-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
#documentViewerModal .dv18-actions button{margin:0!important;min-height:36px;white-space:nowrap}
#documentViewerModal .dv18-actions .icon-btn{width:36px;padding:0;border-radius:8px}
#documentViewerModal .dv18-actions button:focus-visible{outline:2px solid var(--zsc-accent,#1565ff);outline-offset:2px}
#documentViewerModal #onlyofficeViewer{width:100%;height:100%;min-width:0;min-height:0;border:0!important;border-radius:0!important;background:#eef1f5;overflow:hidden;display:block}
#documentViewerModal #onlyofficeViewer>iframe{width:100%;height:100%;display:block;border:0}
#documentViewerModal.dv18-fullscreen{padding:0!important}
#documentViewerModal.dv18-fullscreen .document-viewer-card{width:100vw!important;height:100dvh!important;border-radius:0!important;box-shadow:none}
#documentViewerModal[data-theme="dark"] .document-viewer-card,#documentViewerModal[data-theme="dark"] .dv18-head{background:#111827;color:#e2e8f0;border-color:#334155}
#documentViewerModal[data-theme="dark"] #documentViewerTitle{color:#f1f5f9}
#documentViewerModal[data-theme="dark"] #documentViewerStatus{color:#94a3b8}
#documentViewerModal[data-theme="dark"] .dv18-file-icon{background:#24334b}
#documentViewerModal[data-theme="dark"] .dv18-actions button{background:#1e293b;color:#e2e8f0;border-color:#334155}
#documentViewerModal[data-theme="dark"] #onlyofficeViewer{background:#0f172a;color:#e2e8f0;color-scheme:dark}
#documentViewerModal[data-theme="dark"] .dv18-error .muted{color:#94a3b8}
@media(max-width:700px){
  #documentViewerModal.modal{padding:0!important}
  #documentViewerModal .document-viewer-card{width:100vw!important;height:100dvh!important;border-radius:0!important}
  #documentViewerModal .dv18-head{padding:10px 12px!important;gap:8px;flex-wrap:wrap}
  #documentViewerModal .dv18-title{flex-basis:100%;gap:9px}
  #documentViewerModal .dv18-file-icon{flex-basis:32px;height:32px;font-size:19px;border-radius:8px}
  #documentViewerTitle{font-size:14px!important}
  #documentViewerModal .dv18-actions{width:100%;justify-content:flex-end;gap:6px}
  #documentViewerModal .dv18-actions .icon-btn{margin-left:auto!important}
}
