.table-modern {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}

.table-modern th,
.table-modern td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--bg-hover);
  color: var(--primary-800);
}

.table-modern thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-tertiary);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  font-weight: var(--font-semibold);
  color: var(--primary-900);
}


.table-modern tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.table-modern tbody tr {
  transition: background-color var(--transition-fast);
}

.table-modern tbody tr:hover {
  background: var(--bg-hover);
}

.table-responsive {
  position: relative;
  overflow: auto;
  max-height: 600px; /* Set a max height */
  -webkit-overflow-scrolling: touch;
}

/* Add scroll shadow indicators */
.table-responsive::before,
.table-responsive::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
  z-index: 2;
}
.table-responsive::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary), transparent);
}
.table-responsive::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary), transparent);
}

@media (max-width: var(--screen-sm)) {
  .table-modern th,
  .table-modern td {
    padding: var(--space-2) var(--space-3);
    white-space: nowrap;
  }

  .table-modern td .btn {
    padding: var(--space-1);
  }
}
