<!DOCTYPE html>
<html lang="en" class="font-sans">
  <head>
    <title><%= content_for(:title) || t("reports.print.document_title") %></title>

    <%= csrf_meta_tags %>
    <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="noindex, nofollow">
  </head>

  <body class="bg-white text-gray-900 antialiased print-body">
    <div class="print-container">
      <%= yield %>
    </div>

    <script>
      // Auto-trigger print dialog when page loads
      window.onload = function() {
        // Small delay to ensure styles are loaded
        setTimeout(function() {
          window.print();
        }, 500);
      };
    </script>
  </body>
</html>
