.dv { --dv-bg: #e9eef5; --dv-bar: #ffffff; --dv-ink: #0f172a; --dv-mute: #64748b; --dv-brand: #003a8c; --dv-bd: #dbe4ef; display: flex; flex-direction: column; border: 1px solid var(--dv-bd); border-radius: 18px; overflow: hidden; background: var(--dv-bg); height: 78vh; min-height: 420px; font-family: Inter, system-ui, sans-serif; }
.dv.dv-fullpage { height: calc(100vh - 150px); min-height: 520px; border-radius: 0; border-left: 0; border-right: 0; }
.dv.dv-fs, .dv.dv-fs-fallback { position: fixed; inset: 0; z-index: 10000; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
.dv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--dv-bar); border-bottom: 1px solid var(--dv-bd); flex-wrap: wrap; }
.dv-left { min-width: 0; flex: 1 1 160px; }
.dv-title { font-weight: 800; font-size: 13.5px; color: var(--dv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-meta { font-size: 11px; color: var(--dv-mute); font-weight: 600; letter-spacing: .04em; }
.dv-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dv-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.dv-grp { display: flex; align-items: center; gap: 2px; background: #f1f5f9; border: 1px solid var(--dv-bd); border-radius: 10px; padding: 2px; }
.dv-btn { width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #334155; border-radius: 8px; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.dv-btn:hover { background: #e0ecfb; color: var(--dv-brand); }
.dv-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dv-right .dv-btn { border: 1px solid var(--dv-bd); background: #f8fafc; }
.dv-right .dv-full { background: var(--dv-brand); color: #fff; border-color: var(--dv-brand); }
.dv-right .dv-full:hover { background: #00265e; color: #fff; }
.dv-page-in { width: 46px; height: 28px; border: 1px solid var(--dv-bd); border-radius: 7px; text-align: center; font-size: 13px; font-weight: 700; color: var(--dv-ink); background: #fff; -moz-appearance: textfield; }
.dv-page-in::-webkit-outer-spin-button, .dv-page-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dv-page-tot, .dv-zoom { font-size: 12px; font-weight: 700; color: var(--dv-mute); padding: 0 6px; white-space: nowrap; min-width: 44px; text-align: center; }
.dv-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.dv-pages { flex: 1; overflow: auto; padding: 12px; outline: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.dv-page { margin: 0 auto 14px; background: #fff; box-shadow: 0 2px 10px -2px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15, 23, 42, .06); position: relative; }
.dv-page::before { content: attr(data-page); position: absolute; right: 8px; bottom: 6px; font-size: 10px; font-weight: 700; color: #94a3b8; opacity: .0; transition: opacity .2s; }
.dv-page:not(.is-ready) { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect x='20' y='28' width='80' height='8' rx='4' fill='%23e2e8f0'/%3E%3Crect x='20' y='48' width='64' height='8' rx='4' fill='%23e2e8f0'/%3E%3Crect x='20' y='68' width='72' height='8' rx='4' fill='%23e2e8f0'/%3E%3C/svg%3E") no-repeat center 24px; }
.dv-page canvas { display: block; }
.dv-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dv-mute); font-size: 14px; font-weight: 600; padding: 24px; text-align: center; flex-direction: column; gap: 12px; }
.dv-status.dv-other { position: static; min-height: 240px; }
.dv-other-ico svg { width: 56px; height: 56px; fill: none; stroke: #94a3b8; stroke-width: 1.5; }
.dv-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--dv-brand); color: #fff; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 12px; text-decoration: none; }
.dv-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.dv-paper { flex: 1; overflow: auto; background: #fff; margin: 14px auto; width: min(100% - 24px, 900px); padding: 36px 44px; border-radius: 6px; box-shadow: 0 2px 10px -2px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15, 23, 42, .06); font-size: 15px; line-height: 1.75; color: #1e293b; }
.dv-paper img { max-width: 100%; height: auto; }
.dv-paper table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 13.5px; }
.dv-paper td, .dv-paper th { border: 1px solid #cbd5e1; padding: 6px 8px; vertical-align: top; }
.dv-paper .doc-title { font-size: 1.9em; font-weight: 800; color: var(--dv-brand); }
.dv-paper .doc-subtitle { color: var(--dv-mute); font-weight: 600; }
.dv-paper .doc-note { color: #b45309; font-size: 13px; font-style: italic; }
.dv-paper.dv-sheet { padding: 20px; width: min(100% - 24px, 1200px); }
.dv-sheet .doc-sheet { margin-bottom: 28px; overflow: auto; }
.dv-sheet .doc-sheet-name { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dv-brand); font-weight: 800; margin: 0 0 8px; }
.dv-sheet .doc-table td:empty { padding: 0; }
.dv-sheet .doc-table tr:first-child td { background: #f1f5f9; font-weight: 700; }
.dv-image { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; display: block; padding: 12px; }
.dv-fs .dv-pages, .dv-fs-fallback .dv-pages { padding: 16px; }
@media (max-width: 640px) {
  .dv { height: 72vh; min-height: 360px; border-radius: 14px; }
  .dv-bar { padding: 6px 8px; gap: 6px; }
  .dv-left { flex-basis: 100%; order: -1; }
  .dv-title { font-size: 12.5px; }
  .dv-btn { width: 32px; height: 30px; }
  .dv-page-tot, .dv-zoom { min-width: 36px; padding: 0 3px; font-size: 11px; }
  .dv-right .dv-open { display: none; }
  .dv-pages { padding: 6px; }
  .dv-paper { padding: 18px 16px; margin: 8px auto; width: calc(100% - 12px); font-size: 14px; }
}
@media print { .dv { height: auto; } .dv-bar { display: none; } }
