/* Modern Minimal Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  overflow: hidden;

  th,
  td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
  }

  th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  td {
    font-size: 14px;
    color: #6b7280;

    &.destroy-action {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  tr {
    transition: background-color 0.2s ease;

    &:hover {
      background: #f9fafb;
    }

    &:last-of-type td {
      border-bottom: none;
    }
  }

  .user-images {
    display: flex;
    align-items: center;
    height: 40px;

    img {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      object-position: center;
      border: 2px solid #ffffff;
      margin-left: -8px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

      &:first-of-type {
        margin-left: 0;
      }

      &:last-of-type {
        margin-right: 12px;
      }
    }
  }
}

.table-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;

  .table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 20px;
    transition: all 0.2s ease;

    &:hover {
      border-color: #d1d5db;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      transform: translateY(-2px);
    }

    .table-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;

      h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }
    }

    .table-card-body {
      font-size: 28px;
      font-weight: 700;
      color: var(--primary-color);
      line-height: 1;
    }
  }
}

/* Responsive Table */
@media (max-width: 768px) {
  table {
    font-size: 12px;

    th,
    td {
      padding: 8px 12px;
    }

    .user-images img {
      width: 24px;
      height: 24px;
    }
  }

  .table-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;

    .table-card {
      padding: 16px;

      .table-card-body {
        font-size: 24px;
      }
    }
  }
}

@media (max-width: 480px) {
  table {
    th,
    td {
      padding: 6px 8px;
    }
  }

  .table-cards {
    grid-template-columns: 1fr;

    .table-card {
      padding: 12px;

      .table-card-body {
        font-size: 20px;
      }
    }
  }
}

/* Table utilities */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-striped tr:nth-child(even) {
  background: #f9fafb;
}

.table-hover tr:hover {
  background: #f3f4f6;
}

/* Empty state */
.table-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;

  h3 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
  }

  p {
    margin: 0;
    font-size: 14px;
  }
}
