.data-table {
  @apply w-full border-collapse;
  border-spacing: 0;
}

main {
  max-width: 100%;
  padding: 0 20px;
}

.table-container {
  overflow-x: auto;
  overflow-y: visible !important;
  white-space: nowrap;
}

.data-table th {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: visible !important;
  position: relative !important;
  @apply font-semibold bg-gray-50;
}

.data-table td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: visible !important;
  position: relative !important;
}

.data-table th,
.data-table td {
  @apply px-4 py-3 text-left text-black;
  border-bottom: 1px solid #e5e7eb;
  border-left: none !important;
  border-right: none !important;
}

.data-table tbody tr:hover td {
  background-color: #bfdbfe !important;
  transition: background-color 0.15s ease;
}

.pagination-btn {
  @apply px-3 py-1 border rounded-md hover:bg-gray-100 transition-colors;
}

.pagination-btn.active {
  @apply bg-blue-600 text-white border-blue-600 hover:bg-blue-700;
}

.download-btn {
  @apply text-blue-600 hover:text-blue-800 text-sm font-medium flex items-center px-3 py-1.5 rounded hover:bg-blue-50 transition-colors;
}

.search-fields {
  @apply flex flex-wrap gap-4 mb-4;
}

.search-fields .form-group {
  @apply flex flex-col;
}

.search-fields label {
  @apply block text-sm font-medium text-gray-700 mb-1;
}

.search-fields input {
  @apply px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.required-mark {
  @apply text-red-500;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  padding-right: 24px !important;
}

.sortable-header:hover {
  background-color: #e5e7eb !important;
}

.sort-arrows {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.sort-arrow {
  color: #d1d5db;
  font-size: 10px;
  transition: color 0.2s ease;
}

.sort-arrow.active {
  color: #000000;
}

.column-tooltip {
  visibility: hidden;
  width: 280px;
  background: white;
  color: #333;
  text-align: left;
  border-radius: 8px;
  padding: 12px;
  position: absolute;
  z-index: 10000;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  white-space: normal;
  border: 1px solid #e5e7eb;
}

.column-tooltip::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.column-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: #e5e7eb transparent transparent transparent;
  z-index: -1;
  margin-top: -1px;
}

.column-tooltip strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 4px;
}

.column-tooltip .tooltip-content {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.5;
}

.data-table td:hover .column-tooltip,
th.header-tooltip:hover .column-tooltip {
  visibility: visible;
  opacity: 1;
}
