/* Override default font with Inter */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Print styles */
@media print {
  /* Hide navigation, buttons, and non-essential elements */
  nav,
  button,
  .no-print,
  a[href*="new"],
  a[href*="edit"],
  form button,
  [data-action*="delete"],
  .bg-sky-700,
  .bg-blue-600,
  .bg-red-600 {
    display: none !important;
  }

  /* Hide stats cards and action buttons */
  #stats_cards,
  .mx-auto.flex.justify-end.gap-3 {
    display: none !important;
  }

  /* Hide user info and settings icon in header */
  .flex.items-center.gap-4 {
    display: none !important;
  }

  /* Optimize page layout for print */
  body {
    font-size: 8pt;
    line-height: 1.2;
    margin: 0;
    padding: 0;
  }

  /* Remove max-width constraints to use full page */
  #dashboard_categories,
  #dashboard_categories > div,
  .mx-auto {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Make tables more compact and use full width */
  table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 7pt;
    table-layout: auto !important;
  }

  /* Remove colgroup constraints */
  colgroup {
    display: none;
  }

  thead {
    background-color: #f3f4f6 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  th {
    padding: 2px 4px !important;
    font-size: 6pt;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
  }

  td {
    padding: 2px 4px !important;
    border-bottom: 1px solid #e5e7eb;
    font-size: 7pt;
  }

  /* Reduce heading sizes */
  h1 {
    font-size: 14pt;
    margin-bottom: 8px;
  }

  h2 {
    font-size: 11pt;
  }

  h3 {
    font-size: 9pt;
  }

  /* Category headers smaller */
  .bg-sky-800 {
    padding: 4px 8px !important;
  }

  .bg-sky-800 h3 {
    font-size: 8pt !important;
  }

  .bg-sky-800 .text-sm {
    font-size: 7pt !important;
  }

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

  /* Simplify backgrounds */
  .bg-white,
  .bg-gray-50,
  .bg-blue-50,
  .bg-purple-50,
  .bg-green-50 {
    background-color: transparent !important;
  }

  /* Hide action columns */
  td:last-child,
  th:last-child {
    display: none !important;
  }

  /* Make links look like regular text */
  a {
    color: inherit;
    text-decoration: none;
  }

  /* Compact badges and icons */
  .inline-flex.items-center {
    border: 1px solid #000;
    padding: 1px 2px;
    font-size: 6pt;
  }

  svg {
    width: 12px !important;
    height: 12px !important;
  }

  /* Page breaks */
  .page-break {
    page-break-after: always;
  }

  /* Ensure colors are printed */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide empty table rows */
  tr:has(td[colspan]) {
    display: none;
  }

  /* Tighter spacing between categories */
  #dashboard_categories > div {
    margin-bottom: 8px !important;
  }
}
