table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
}

caption {
  caption-side: top;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: left;
}

thead th,
tbody td,
tfoot td {
  border: 1px solid #333;
  padding: 10px;
  text-align: left;
}

thead th {
  background-color: #f7f7f7;
  font-weight: bold;
}

tbody tr:nth-child(even) {
  background-color: #f0f0f0;
}

tbody td:hover {
  background-color: #e0e0e0;
}

tfoot td {
  background-color: #fafafa;
  font-style: italic;
  text-align: center;
  padding: 1rem;
  border-top: 2px solid #333;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  table {
    font-size: 0.9rem;
  }
}

@media (max-width: 767px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    padding: 0.5rem;
    background: #fff;
  }

  tbody td {
    padding: 10px 10px 10px 50%;
    text-align: right;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    background-color: #fff;
  }

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    padding-left: 10px;
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
  }
}
