<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ $document->title }}</title>
    <style>
        body { font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: #f4f6f9; color: #222; }
        .bar { background: #2c3e50; color: #fff; padding: 12px 18px; font-size: 15px; }
        .wrap { max-width: 1000px; margin: 16px auto; padding: 0 12px; }
        .card { background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
        .frame { width: 100%; height: 80vh; border: 0; display: block; }
        img.doc { max-width: 100%; display: block; margin: 0 auto; }
        .foot { padding: 10px 14px; font-size: 12px; color: #888; }
    </style>
</head>
<body>
    <div class="bar">{{ $document->title }} &nbsp;·&nbsp; @lang('meddocuments::lang.shared_view')</div>
    <div class="wrap">
        <div class="card">
            @if($version->isImage())
                <img class="doc" src="{{ $viewUrl }}" alt="{{ $document->title }}">
            @else
                <iframe class="frame" src="{{ $viewUrl }}"></iframe>
            @endif
        </div>
        <p class="foot">@lang('meddocuments::lang.watermark_notice')</p>
    </div>
</body>
</html>
