/* Enterprise Table Styling - Professional Data Tables */

/* Table Container - 3D Enhanced */
.task-table-container {
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.07),
    0 10px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.task-table-container:hover {
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.1),
    0 15px 30px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* Table Base Styling */
.task-table-container .table {
  margin-bottom: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: #1e293b;
}

/* Table Header - 3D Enhanced */
.task-table-container thead {
  background: linear-gradient(145deg, #1e3a5f 0%, #2c5282 50%, #1e3a5f 100%);
  border-bottom: 3px solid #1e3a5f;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
}

.task-table-container thead::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(59, 130, 246, 0.5) 50%, 
    transparent 100%);
}

.task-table-container thead th {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.813rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
  border-top: none;
  vertical-align: middle;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Sortable Headers - 3D Enhanced */
.task-table-container .sortable-header {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.task-table-container .sortable-header:hover {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.task-table-container .sortable-header i {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.task-table-container .sortable-header:hover i {
  opacity: 1;
}

/* Table Body - 3D Enhanced */
.task-table-container tbody tr {
  border-bottom: 1px solid #cbd5e1;
  transition: all 0.2s ease;
  background: linear-gradient(180deg, #e2e8f0 0%, #e8edf3 100%);
  position: relative;
}

.task-table-container tbody tr::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(148, 163, 184, 0.5) 10%,
    rgba(148, 163, 184, 0.5) 90%,
    transparent 100%);
}

.task-table-container tbody tr:hover {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  cursor: pointer;
  transform: translateX(4px);
  box-shadow: 
    -4px 0 0 #3b82f6,
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(59, 130, 246, 0.1);
  z-index: 1;
}

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

.task-table-container tbody td {
  padding: 16px;
  vertical-align: middle;
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.5;
  border-top: none;
  position: relative;
}

/* Status Badges - 3D Enhanced */
.task-table-container .badge {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.task-table-container .badge:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.task-table-container .status-badge-complete {
  background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
  border: 1px solid #86efac;
}

.task-table-container .status-badge-in_progress {
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.task-table-container .status-badge-pending {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  border: 1px solid #fcd34d;
}

.task-table-container .status-badge-on_hold {
  background: linear-gradient(145deg, #f9fafb 0%, #f3f4f6 100%);
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.task-table-container .status-badge-todo {
  background: linear-gradient(145deg, #fee2e2 0%, #fecaca 100%);
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* Priority Badges - 3D Enhanced */
.task-table-container .badge-critical {
  background: linear-gradient(145deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.task-table-container .badge-high {
  background: linear-gradient(145deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
  border: 1px solid #fb923c;
}

.task-table-container .badge-medium {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
}

.task-table-container .badge-low {
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

/* Action Buttons - 3D Enhanced */
.task-table-container .btn-sm {
  padding: 6px 14px;
  font-size: 0.813rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
}

.task-table-container .btn-outline-primary {
  color: #1e40af;
  border-color: #3b82f6;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.task-table-container .btn-outline-primary:hover {
  background: linear-gradient(145deg, #1e40af 0%, #1e3a8a 100%);
  border-color: #1e3a8a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 
    0 4px 8px rgba(30, 64, 175, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 991px) {
  .task-table-container tbody td {
    padding: 12px 10px;
    font-size: 0.813rem;
  }
  
  .task-table-container thead th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
}

/* Empty State */
.task-table-container .text-center.text-muted {
  padding: 3rem 1rem;
  color: #64748b !important;
  font-size: 0.938rem;
}

/* Links in table */
.task-table-container a:not(.btn):not(.sortable-header) {
  color: #1e40af;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.task-table-container a:not(.btn):not(.sortable-header):hover {
  color: #1e3a8a;
  text-decoration: underline;
}

/* Truncated text with ellipsis */
.task-table-container .text-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Actions Column - Dropdown Visibility Fix */
.task-table-container .table th:last-child,
.task-table-container .table td:last-child {
  width: 80px;
  min-width: 80px;
  overflow: visible;
}

/* Dropdown specific fixes */
.task-table-container .dropdown {
  position: relative;
}

.task-table-container .dropdown-menu {
  z-index: 1050;
  position: absolute;
  min-width: 120px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Ensure dropstart menus appear properly */
.task-table-container .dropstart .dropdown-menu {
  right: 100%;
  left: auto;
  margin-right: 0.125rem;
}

/* Ensure table rows don't clip dropdown */
.task-table-container tbody tr {
  position: relative;
}