dialog.crm-file-viewer{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#f3f3f1;color:#202522;overflow:hidden;box-sizing:border-box}dialog.crm-file-viewer[open]{display:flex;flex-direction:column}.crm-file-viewer::backdrop{background:#0008}.crm-file-viewer header{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));background:white;border-bottom:1px solid #ddd;z-index:1}.crm-file-viewer header strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.crm-file-viewer header button,.crm-file-viewer header a{flex-shrink:0;min-height:44px;display:inline-flex;align-items:center;border-radius:14px;padding:8px 12px;color:#202522;background:#f1f2f0;text-decoration:none;border:0;font:inherit}.crm-file-content{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}.crm-file-content p{padding:12px;margin:0;font-size:14px}.crm-file-content iframe{flex:1;min-height:60vh;width:100%;border:0;background:white}.crm-file-content img{display:block;max-width:100%;object-fit:contain;min-height:0;flex:1}

.crm-file-content progress{width:calc(100% - 24px);margin:0 12px 12px;height:6px;flex-shrink:0;accent-color:#e88738}.crm-file-content progress[hidden]{display:none}.crm-pdf-nav{display:flex;gap:16px;align-items:center;justify-content:center;padding:8px;position:sticky;top:0;background:#f3f3f1;z-index:1}.crm-pdf-nav button{min-width:44px;min-height:44px;border-radius:12px}.crm-pdf-page{max-width:calc(100% - 24px);height:auto;margin:0 auto 16px;flex-shrink:0;background:white}

.crm-excel-nav{display:flex;gap:8px;align-items:center;padding:8px 12px;flex-wrap:wrap;flex-shrink:0}.crm-excel-nav select{max-width:100%;flex:1;min-width:120px}.crm-excel-nav button{min-height:44px;min-width:44px;border-radius:12px}.crm-excel-nav span{font-size:12px}.crm-excel-table{overflow:auto;flex:1;min-height:100px;background:white}.crm-excel-table table{border-collapse:collapse;width:max-content;min-width:100%;font-size:13px}.crm-excel-table td,.crm-excel-table th{border:1px solid #ddd;padding:7px 10px;white-space:pre;max-width:400px;overflow:hidden}.crm-excel-table th{position:sticky;left:0;background:#f1f1ef;color:#777;min-width:35px}
