/* Vue 2 Universal Document Viewer — isolated dv- namespace */
.dv-root,.dv-root * { box-sizing:border-box; }
.dv-root { --dv-border:#e5eaf2;--dv-ink:#18243a;--dv-muted:#76839a;--dv-accent:#2563eb;--dv-page:#f2f5fa; position:relative;display:flex;flex-direction:column;min-width:0;max-width:100%;border:1px solid var(--dv-border);border-radius:14px;background:#fff;color:var(--dv-ink);overflow:hidden;font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
.dv-root button { font:inherit; }
.dv-toolbar { flex:0 0 auto;min-height:60px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid var(--dv-border);z-index:5;flex-wrap:wrap; }
.dv-file { display:flex;align-items:center;gap:11px;min-width:0;flex:1 1 160px; }
.dv-file-icon { display:flex;align-items:center;justify-content:center;flex:0 0 39px;height:39px;border-radius:10px;background:#eaf0ff;color:#2459d9;font-size:25px;font-weight:700; }
.dv-file-label { min-width:0;display:flex;flex-direction:column;gap:2px; }
.dv-file-label strong { white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:340px;font-size:13px;font-weight:650; }
.dv-file-label small { font-size:11px;color:var(--dv-muted); }
.dv-viewer-switch { display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid #d7e0ef;border-radius:10px;background:#f5f8fd;flex:0 0 auto; }
.dv-viewer-option { position:relative;display:inline-flex;align-items:center;justify-content:center;gap:0;min-height:28px;padding:0 10px;border-radius:8px;font-size:11px;font-weight:650;color:#4a5d7a;cursor:pointer;user-select:none; }
.dv-viewer-option input { position:absolute;opacity:0;pointer-events:none; }
.dv-viewer-option.is-active { background:#fff;color:#1f4fbf;box-shadow:0 1px 2px #1f3f7620; }
.dv-viewer-option.is-disabled { opacity:.42;cursor:not-allowed; }
.dv-viewer-option:not(.is-disabled):hover { color:#1f4fbf; }
.dv-tools { display:flex;align-items:center;gap:5px;white-space:nowrap;margin-left:auto; }
.dv-btn { color:#394761;background:transparent;border:1px solid transparent;border-radius:8px;min-width:32px;height:32px;padding:0 8px;cursor:pointer;font-size:18px!important;display:inline-flex;align-items:center;justify-content:center; }
.dv-btn:hover:not(:disabled) { background:#eff3fa;border-color:#e3e8f2; }
.dv-btn:disabled { cursor:not-allowed;opacity:.33; }
.dv-btn--local { border:1px solid #bfceef;background:#f6f9ff;color:#245ad3;font-size:12px!important;font-weight:650!important;padding:0 10px; }
.dv-counter { font-size:12px;font-weight:650;font-variant-numeric:tabular-nums;color:#526078;min-width:47px;text-align:center; }
.dv-separator { height:20px;border-left:1px solid var(--dv-border);margin:0 5px; }
.dv-content { position:relative;flex:1 1 auto;min-height:0;overflow:hidden;background:var(--dv-page); }
.dv-empty { width:100%;height:100%;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:30px;color:#273b56; }
.dv-empty strong { font-size:15px; }
.dv-empty span:not(.dv-spinner) { max-width:540px;color:var(--dv-muted);font-size:13px;overflow-wrap:anywhere; }
.dv-empty-symbol { width:61px;height:61px;display:flex;align-items:center;justify-content:center;border-radius:16px;color:#5182dc;background:#e7edfb;font-size:34px;margin-bottom:6px; }
.dv-empty--error .dv-empty-symbol { background:#fee9e7;color:#dc5b55; }
.dv-action { border:0;border-radius:8px;background:var(--dv-accent);color:#fff;padding:9px 15px;cursor:pointer;margin-top:10px;font-weight:600; }
.dv-spinner { display:inline-block;border:3px solid #dce6fc;border-top-color:var(--dv-accent);width:36px;height:36px;border-radius:50%;animation:dv-spin .7s linear infinite;margin-bottom:10px; }
@keyframes dv-spin { to { transform:rotate(360deg); } }
.dv-stage { width:100%;height:100%;overflow:auto; }
.dv-pdf-stage { text-align:center;padding:24px; }
.dv-pdf-canvas { display:block;margin:0 auto;background:#fff;box-shadow:0 9px 35px rgba(35,50,75,.14); }
.dv-image-stage { display:flex;justify-content:center;align-items:center;padding:28px; }
.dv-image-stage img { max-width:100%;max-height:100%;object-fit:contain;transform-origin:center center;box-shadow:0 8px 25px rgba(25,35,55,.09);transition:transform .14s ease; }
.dv-office-frame { display:block;height:100%;width:100%;background:#fff;border:0; }
.dv-docx-stage { background:#e9eef6; }
.dv-excel-view { height:100%;display:flex;flex-direction:column;background:#fff; }
.dv-sheets { display:flex;gap:3px;padding:9px 10px 0;border-bottom:1px solid var(--dv-border);overflow:auto;flex:0 0 auto;background:#f8faff; }
.dv-sheet-button { padding:8px 15px;white-space:nowrap;background:transparent;border:0;border-radius:7px 7px 0 0;color:#65718a;cursor:pointer;font-size:12px;font-weight:600; }
.dv-sheet-button:hover { background:#eaf0fa; }
.dv-sheet-button.active { background:#fff;color:#225bd8;border-bottom:2px solid #225bd8; }
.dv-spreadsheet { flex:1;min-height:0;overflow:auto; }
.dv-table { width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px;table-layout:fixed;background:#fff; }
.dv-table th,.dv-table td { border-bottom:1px solid #e5eaf1;border-right:1px solid #e5eaf1;padding:6px 10px;height:30px;text-align:left;min-width:130px;max-width:300px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden; }
.dv-table thead th { position:sticky;top:0;background:#f3f6fa;text-align:center;z-index:3;font-weight:600;color:#5a6880;height:32px; }
.dv-table tbody th { position:sticky;left:0;min-width:47px;width:47px;background:#f7f9fc;text-align:center;color:#8490a3;z-index:2;font-weight:500; }
.dv-table thead .dv-corner { position:sticky;left:0;z-index:4;min-width:47px;width:47px;background:#eef2f8; }
.dv-table tbody tr:hover td { background:#f7faff; }
.dv-sheet-footer { font-size:11px;color:#8290a4;border-top:1px solid var(--dv-border);padding:8px 12px;flex:0 0 auto;background:#fbfcfe; }
.dv-text { height:100%;overflow:auto;margin:0;padding:24px;white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;color:#314057;font:12px/1.65 Menlo,Consolas,Monaco,monospace;tab-size:2; }
.dv-media-stage { display:flex;align-items:center;justify-content:center;padding:24px; }
.dv-media-stage video { max-width:100%;max-height:100%;border-radius:9px;background:#182337; }
.dv-media-stage audio { width:min(480px,100%); }
.dv-watermark { position:absolute;inset:0;pointer-events:none;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);align-items:center;justify-items:center;overflow:hidden;z-index:3;user-select:none; }
.dv-watermark span { font-size:clamp(12px,2vw,25px);font-weight:750;color:#516a9a;opacity:.16;white-space:nowrap;transform:rotate(-28deg);padding:8px; }
.dv-root--fullscreen { position:fixed!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;border-radius:0!important;z-index:2147483000; }
.dv-root:fullscreen { border:0;border-radius:0;width:100%!important;height:100%!important;max-width:none!important; }
@media(max-width:640px) { .dv-toolbar { padding:8px;flex-wrap:wrap;gap:6px; }.dv-file-label strong { max-width:180px; }.dv-viewer-switch { order:3;width:100%;justify-content:stretch; }.dv-viewer-option { flex:1; }.dv-tools { justify-content:flex-end;flex:1; }.dv-pdf-stage { padding:10px; }.dv-docx-stage { padding:10px 0; }.dv-btn { min-width:28px;padding:0 5px; }.dv-file-icon { display:none; } }
/* Office Online iframe surface. */
.dv-office-wrapper {display:flex;flex-direction:column;height:100%;min-height:0;background:#fff;}
.dv-office-wrapper .dv-office-frame {flex:1 1 auto;min-height:0;height:auto;width:100%;border:0;}
.dv-mini-spinner {width:12px;height:12px;flex:0 0 12px;border:2px solid #cad9f6;border-top-color:#2563eb;border-radius:50%;animation:dv-spin .7s linear infinite;}

/* 1.3: High-fidelity local DOCX reading surface. Document-defined Word CSS wins. */
.dv-docx-stage { position:relative; overflow:auto; padding:22px 18px 34px; overscroll-behavior:contain; }
.dv-docx-document { width:max-content; max-width:none; min-width:0; margin:0 auto; transform-origin:top center; }
.dv-docx-body { width:max-content; max-width:none; min-width:0; margin:0; }
.dv-docx-body > [class$="-wrapper"] { background:transparent!important; padding:0!important; }
/* overflow:hidden keeps letterhead ink inside the page card so it does not paint over box-shadow.
   Floating logos are nudged inward in enhanceDocxFidelity so they stay visible within the page. */
.dv-docx-body section[class^="dv-docx-"] { display:flex; flex-flow:column nowrap; position:relative; background:#fff; margin:0 auto 22px!important; box-shadow:0 6px 23px rgba(35,49,73,.16); overflow:hidden!important; isolation:isolate; }
/* Never force max-width on Word images. docx-preview uses 0×0 hosts for wrapNone/floating
   drawings (common in letterhead logos); max-width:100% collapses those images to 0 width. */
.dv-docx-body section[class^="dv-docx-"] img,
.dv-docx-body section[class^="dv-docx-"] svg,
.dv-docx-body section[class^="dv-docx-"] image { max-width:none!important; max-height:none!important; }
/* Header/footer above page chrome; article above them so Word behindDoc watermarks
   (absolute images in the header that spill into the body) do not cover body text.
   Transparent article background still lets the watermark show through empty areas. */
.dv-docx-body section[class^="dv-docx-"] > header,
.dv-docx-body section[class^="dv-docx-"] > footer { position:relative; z-index:2; overflow:visible; flex:0 0 auto; }
.dv-docx-body section[class^="dv-docx-"] > article { position:relative; z-index:3; flex:1 1 auto; min-width:0; background:transparent; }
.dv-docx-style-host { height:0;overflow:hidden; }
.dv-docx-loading {position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;background:#f8fbff;border:1px solid #dae6fa;border-radius:8px;font-size:12px;color:#425d86;margin:0 0 12px;}
.dv-docx-pagehint {font-size:11px;text-align:center;color:#77849b;margin:5px auto 0;max-width:95%;}
@media(max-width:640px) { .dv-docx-stage {padding:12px 8px 24px;} }
