/* Official paper copies: header with logo and title, clean tables, no menus or buttons. */
.epmrs-print-header, .epmrs-print-blocked { display: none; }

@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; @bottom-center { content: counter(page) " / " counter(pages); font-size: 9pt; } }
  html, body { background: #fff !important; color: #000 !important; }
  body * { box-shadow: none !important; text-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .epmrs-sidebar, .epmrs-topbar, .epmrs-mobile-nav, .epmrs-tabbar, nav.epmrs-tabbar, .epmrs-popup-stack, .toast-container,
  .btn, .no-print, form[method="GET" i], .pagination, [data-ai-chatbox], .ai-chatbox, .epmrs-global-voice, .dropdown-menu,
  .nav-pills, .nav-tabs, .epmrs-autosave-banner, .epmrs-draft-state, .breadcrumb, .epmrs-breadcrumb, [data-ai-chat] { display: none !important; }
  .epmrs-main { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
  .container, .container-fluid { max-width: 100% !important; padding: 0 !important; }
  .card, .epmrs-card, .glass, .glass-thick { background: #fff !important; border: 1px solid #999 !important; break-inside: avoid; }
  .table-responsive { overflow: visible !important; }
  table { width: 100% !important; min-width: 0 !important; border-collapse: collapse !important; font-size: 9pt; }
  .table-responsive table { font-size: 7.5pt; }
  details { display: none !important; }
  th, td { border: 1px solid #666 !important; padding: 3px 5px !important; color: #000 !important; background: #fff !important; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  thead th { background: #dbeafe !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: #000 !important; text-decoration: none !important; }
  .badge { border: 1px solid #666 !important; color: #000 !important; background: #fff !important; }

  .epmrs-print-header {
    display: flex !important; align-items: center; gap: 12px; padding-bottom: 8px; margin-bottom: 10px;
    border-bottom: 2px solid #000; text-align: center;
  }
  .epmrs-print-header img { width: 60px; height: 60px; object-fit: contain; }
  .epmrs-print-header > div:nth-child(2) { flex: 1; }
  .epmrs-print-header__gov, .epmrs-print-header__org { font-weight: 700; font-size: 12pt; }
  .epmrs-print-header__title { font-weight: 800; font-size: 14pt; margin-top: 4px; }
  .epmrs-print-header__meta { font-size: 8pt; text-align: start; }

  /* Not allowed to print: only a notice comes out of the printer. */
  /* Not allowed to print: the page prints blank except the notice, wherever the notice sits. */
  body[data-print-allowed="0"] * { visibility: hidden !important; }
  body[data-print-allowed="0"] .epmrs-print-blocked { display: block !important; visibility: visible !important; position: fixed; inset: 0; padding: 40mm 10mm; text-align: center; font-size: 16pt; font-weight: 700; background: #fff; }
}

/* A moment of cover after the Print Screen key, for people without print permission. */
body.epmrs-shielded main { filter: blur(18px); transition: filter 80ms; }
