/**
 * Sajelli — print stylesheet.
 * Loaded after the kit + font override so it overrides on print only.
 *
 * Targets the `print-page` class to render a clean printable document
 * (invoice, statement, etc.). All chrome (header, sidebar, navigation,
 * buttons) is hidden when the user prints.
 */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  /* Hide all app chrome */
  .app-header,
  .app-sidebar,
  .app-menubar-tabs,
  .app-footer,
  .breadcrumb,
  .app-page-head,
  nav,
  .no-print,
  button,
  .btn {
    display: none !important;
  }

  /* Drop the layout wrapper */
  .app-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .container-fluid,
  .container,
  .row,
  .col-12 {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* The print-page class wraps the printable area */
  .print-page {
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    padding: 1.5cm !important;
    page-break-inside: avoid;
  }

  .print-page table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .print-page table th,
  .print-page table td {
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
  }

  .print-page .badge {
    border: 1px solid #ccc !important;
    background: transparent !important;
    color: #000 !important;
  }

  /* Avoid breaking inside cards */
  .card,
  .print-section {
    page-break-inside: avoid;
  }

  /* Remove background colors that look bad in print */
  .bg-light,
  .bg-primary-subtle,
  .bg-success-subtle,
  .bg-warning-subtle,
  .bg-danger-subtle,
  .bg-info-subtle,
  .bg-secondary-subtle {
    background: transparent !important;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 1cm;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}
