.table-section {
  padding: 20px 15px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  font-size: 0.9rem;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid #f0f0f0;
  word-break: break-word;
}

.table thead th {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 600;
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr:hover {
  background-color: #f1f3f5;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.json-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e9ecef;
  margin: 8px 0;
  font-size: 0.85em;
  background-color: #fdfdfd;
}

.json-table th,
.json-table td {
  padding: 8px 10px;
  border: 1px solid #e9ecef;
  word-break: break-word;
}

.json-table th {
  background-color: #f1f3f5;
  font-weight: 500;
}

.no-data-message {
  padding: 25px;
  text-align: center;
  color: #6c757d;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .table-section {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
  }

  .table {
    border-radius: 0;
    box-shadow: none;
    font-size: 0.875rem;
  }

  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
  }

  .table tbody td {
    display: flex;
    align-items: flex-start;
    text-align: right;
    padding: 12px 10px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    min-height: 2.8em;
  }

  .table tbody td:before {
    content: attr(data-colname);
    font-weight: bold;
    text-align: left;
    color: #333;
    flex-basis: 25%;
    margin-right: 10px;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.4;
    font-size: 0.9em;
  }

  .table tbody td > * {
    flex-basis: 70%;
    text-align: right;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 0.95em;
  }

  .table tbody td:last-child {
    border-bottom: none;
  }

  .json-table {
    font-size: 0.8em;
  }

  .json-table th,
  .json-table td {
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .table tbody td {
    font-size: 0.825rem;
  }

  .table tbody td:before {
    flex-basis: 30%;
    font-size: 0.85em;
  }

  .table tbody td > * {
    flex-basis: 65%;
    font-size: 0.9em;
  }
}
