@media print {
  /* Hide non-printable elements */
  .navbar, aside, .sidebar-item, .tabs, .dropdown,
  .htmx-indicator, #sidebar, footer,
  .no-print {
    display: none !important;
  }

  /* Hide buttons except inside table cells */
  .btn:not(td .btn):not(th .btn) {
    display: none !important;
  }

  /* Full width content */
  main, .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 4px 8px;
    text-align: left;
  }

  /* Cards */
  .card {
    border: 1px solid #ddd;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Progress bars */
  .progress {
    border: 1px solid #ccc;
    height: 8px;
  }

  /* Badges */
  .badge {
    border: 1px solid #999;
    padding: 1px 4px;
  }

  /* Page title */
  .print-title {
    display: block !important;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}
