@media print {
  /* Page setup */
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  /* Reset body */
  body {
    background: white !important;
    font-size: 10pt;
  }

  /* Hide navigation, header buttons, and interactive UI */
  nav, footer {
    display: none !important;
  }

  /* Hide action buttons in header */
  .flex.space-x-2 {
    display: none !important;
  }

  /* Hide drag handles and menu icons */
  .drag-handle {
    display: none !important;
  }

  /* Hide all modals */
  .fixed.inset-0,
  [x-cloak] {
    display: none !important;
  }

  /* Change main flex layout from row to column */
  .flex.gap-4 {
    flex-direction: column !important;
  }

  /* Make calendar take full width */
  .flex-1.min-w-0 {
    width: 100% !important;
    min-width: 100% !important;
  }

  /* Driver sidebar: full width, horizontal layout */
  .w-64.flex-shrink-0 {
    width: 100% !important;
    flex-shrink: 1 !important;
    margin-top: 10mm;
    page-break-before: auto;
  }

  /* Make driver cards container horizontal with wrap */
  .w-64.flex-shrink-0 .space-y-2 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Override space-y-2 margin */
  .w-64.flex-shrink-0 .space-y-2 > * {
    margin-top: 0 !important;
  }

  /* Size each driver card */
  .w-64.flex-shrink-0 .space-y-2 > div {
    width: calc(25% - 6px) !important; /* 4 per row */
    min-width: 150px;
    flex-shrink: 0;
  }

  /* Remove sticky positioning */
  .sticky {
    position: static !important;
  }

  /* Optimize table */
  table {
    border-collapse: collapse;
    width: 100%;
    font-size: 9pt;
  }

  thead {
    display: table-header-group;
  }

  tr {
    page-break-inside: avoid;
  }

  th, td {
    border: 1px solid #ddd;
    padding: 2px 4px;
  }

  /* Simplify select dropdowns to text */
  select {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 9pt;
  }

  /* Remove shadows and rounded corners */
  .shadow, .shadow-md, .shadow-lg {
    box-shadow: none !important;
  }

  /* Ensure colors print */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Adjust main container */
  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  .container {
    max-width: none !important;
    padding: 0 !important;
  }

  /* Keep header info visible */
  h1 {
    font-size: 14pt;
    margin-bottom: 5mm;
  }

  /* Hide delete buttons and interactive elements */
  td button,
  td form,
  .w-64.flex-shrink-0 form,
  .w-64.flex-shrink-0 button {
    display: none !important;
  }

  /* Hide note icons and edit hints */
  .note-btn {
    display: none !important;
  }

  /* Remove hover effects */
  .cursor-pointer {
    cursor: default !important;
  }

  /* Compact driver cards for print */
  .w-64.flex-shrink-0 .p-2 {
    padding: 4px !important;
  }

  .w-64.flex-shrink-0 .p-3 {
    padding: 6px !important;
  }
}
