/* Keep screen branding unchanged. Use the available A4 page efficiently so
   a short fiscal document retains its totals and authority QR together. */
@media print {
  html:has(.fiscal-current), body:has(.fiscal-current) {
    margin:0!important; padding:0!important; min-height:0!important;
    background:#fff!important;
  }
  .invoice-sheet:has(.fiscal-current) { margin:0; padding:0; border:0; }
  .fiscal-current:not(.thermal) { font-size:10px; line-height:1.25; }
  .fiscal-current:not(.thermal) .institution-header {
    grid-template-columns:56px minmax(0,1fr); gap:6px 12px; padding-bottom:8px;
  }
  .fiscal-current:not(.thermal) .institution-logo { width:56px; height:56px; }
  .fiscal-current:not(.thermal) .institution-identity h1 {
    font-size:18px; line-height:1.2; margin:0 0 4px;
  }
  .fiscal-current:not(.thermal) p { margin:2px 0; }
  .fiscal-current:not(.thermal) .institution-document-id {
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:2px 12px;
  }
  .fiscal-current:not(.thermal) .institution-document-id h2 {
    grid-column:1/-1; font-size:14px; margin:0 0 4px;
  }
  .fiscal-current:not(.thermal) .institution-buyer { margin:10px 0; }
  .fiscal-current:not(.thermal) .document-status { margin-top:8px; padding:6px; }
  .fiscal-current:not(.thermal) .institution-lines th,
  .fiscal-current:not(.thermal) .institution-lines td { padding:6px 4px; }
  .fiscal-current:not(.thermal) .institution-closing { margin-top:10px; gap:12px; }
  .fiscal-current:not(.thermal) .institution-totals { gap:4px 16px; }
  .fiscal-current:not(.thermal) .institution-authority {
    margin-top:12px; padding-top:8px; gap:12px; break-inside:avoid;
  }
  .fiscal-current:not(.thermal) .institution-technology {
    font-size:8px; margin-top:12px; padding-top:8px;
  }
}
