/* Kontener z poziomym przewijaniem na małych ekranach */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* płynne przewijanie na iOS */
}

/* Podstawowe style tabeli */
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* wymusza przewijanie zamiast łamania układu */
  font-family: Arial, sans-serif;
}

th, td {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  text-align: left;
}

thead {
  background-color: #f2f2f2;
}

tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

/* Responsywne przekształcenie tabeli na wąskich ekranach */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    margin-bottom: 1.25rem;
  }

  td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #eee;
  }

  td:before {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    width: 45%;
    padding-right: 1rem;
    white-space: nowrap;
    font-weight: bold;
  }
}