/* Enhanced ThemeForest-Style Table */
.data-table-container {
    background-color: var(--dark-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.data-table-wrapper {
    overflow-x: auto;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.data-table thead {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(90, 82, 213, 0.05));
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table thead th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(108, 99, 255, 0.2);
    white-space: nowrap;
    position: relative;
}

.data-table thead th:first-child {
    border-top-left-radius: var(--border-radius);
}

.data-table thead th:last-child {
    border-top-right-radius: var(--border-radius);
}

.data-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.data-table thead th.sortable:hover {
    background-color: rgba(108, 99, 255, 0.15);
    color: var(--primary);
}

.data-table thead th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    margin-left: 8px;
    font-size: 11px;
    opacity: 0.5;
    transition: var(--transition);
}

.data-table thead th.sortable.asc::after {
    content: '\f0de';
    opacity: 1;
    color: var(--primary);
}

.data-table thead th.sortable.desc::after {
    content: '\f0dd';
    opacity: 1;
    color: var(--primary);
}

.data-table tbody {
    background-color: var(--dark-card);
}

.data-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInRow 0.4s ease-out;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: var(--dark-card-hover);
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table tbody tr.selected {
    background-color: rgba(108, 99, 255, 0.15);
    border-left: 3px solid var(--primary);
}

.data-table tbody td {
    padding: 18px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Content Styles */
.table-cell-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
}

.table-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.table-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.table-info-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-info-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge Styles */
.table-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-transform: capitalize;
}

.table-badge.status-active {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.table-badge.status-inactive {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.table-badge.status-pending {
    background-color: rgba(255, 152, 0, 0.2);
    color: var(--warning);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.table-badge.role-admin {
    background-color: rgba(108, 99, 255, 0.2);
    color: var(--primary);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.table-badge.role-user {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.table-badge.role-viewer {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

/* Action Buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.table-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    color: white;
    font-size: 14px;
    position: relative;
}

.table-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.table-action-btn.view {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.table-action-btn.edit {
    background: linear-gradient(135deg, var(--warning), #f57c00);
}

.table-action-btn.delete {
    background: linear-gradient(135deg, var(--danger), #d32f2f);
}

.table-action-btn.block {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.table-action-btn:hover {
    opacity: 0.9;
}

.table-action-btn:active {
    transform: translateY(0);
}

/* Empty State */
.table-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.table-empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.table-empty-state h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.table-empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Loading State */
.table-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.table-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(108, 99, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Row Animation */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.data-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.data-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.data-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.data-table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.5s; }

/* Responsive Table */
@media (max-width: 768px) {
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 800px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 12px 15px;
        font-size: 13px;
    }

    .table-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .table-action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Scrollbar Styling for Table */
.data-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.data-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.data-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

