/* Table base styles */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-family: sans-serif;
  font-size: 0.95em;
}

/* Header styles */
table thead tr {
  background-color: #004080;
  color: white;
  text-align: left;
}

table th, table td {
  border: 1px solid #999;
  padding: 0.4em 0.6em;
}

/* Alternate row colors */
table tbody tr:nth-child(even) {
  background-color: #f3f3f3;
}

td:nth-child(1) {
  font-weight: bold;
}

/* Active: light green */
td.active {
  color: #006600;
  font-weight: bold;
}

/* Passive: blue */
td.passive {
  color: #003399;
  font-weight: bold;
}

/* Middle: orange */
td.middle {
  color: #cc6600;
  font-weight: bold;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(8) {
  font-weight: bold;
}

/* Responsive: allow horizontal scroll on small screens */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
  }
}

/* Print styles */
@media print {
  /* Hide common layout elements */
  header, footer, nav, .site-header, .site-footer, #searchInput, .no-print {
    display: none;
  }

  body {
    background: white;
    font-size: 8pt;
  }

  table {
    width: 100%;
  }

  /* Remove background colors for ink saving */
  table thead tr,
  table tbody tr:nth-child(even) {
    background-color: transparent !important;
    color: black !important;
  }

  table th, table td {
    border: 1px solid #000;
  }

  /* Prevent row breaking */
  tr {
    page-break-inside: avoid;
  }
}
