/* ========== ENHANCED TABLES ========== */

.table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 900px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th {
    background: var(--gray-100);
    padding: var(--space-md);
    font-weight: bold;
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: center;
}

.admin-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-secondary);
    vertical-align: middle;
    text-align: center;
    min-height: 60px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.admin-table tbody tr {
    transition: all var(--transition-fast);
}

.admin-table tbody tr:hover {
    background-color: var(--gray-50);
    transform: scale(1.005);
    box-shadow: var(--shadow-sm);
}

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

.admin-table tbody tr:nth-child(even):hover {
    background-color: var(--gray-100);
}

/* Table Column Sizing */
.id-col {
    width: 80px;
    text-align: center;
}

.name-col {
    min-width: 150px;
    max-width: 200px;
}

.date-col {
    width: 120px;
    text-align: center;
}

.status-col {
    width: 130px;
    text-align: center;
}

.priority-col {
    width: 100px;
    text-align: center;
}

.actions-col {
    width: 160px;
    min-width: 160px;
    text-align: center;
    vertical-align: middle;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Enhanced Action Buttons */
.actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
    min-height: 60px;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure actions cell has consistent alignment */
.admin-table td.actions {
    vertical-align: middle;
    min-height: 60px;
    padding: var(--space-md);
}

/* Remove conflicting styles - let individual button classes handle styling */

.btn-edit,
.btn-details,
.btn-delete,
.btn-plans {
    background: var(--bg-primary);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-edit::before,
.btn-details::before,
.btn-delete::before,
.btn-plans::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.btn-edit:hover::before,
.btn-details:hover::before,
.btn-delete:hover::before,
.btn-plans:hover::before {
    opacity: 0.1;
}

.btn-edit {
    color: var(--info);
    border-color: var(--info);
}

.btn-edit:hover {
    background: var(--info);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-details {
    color: var(--success);
    border-color: var(--success);
}

.btn-details:hover {
    background: var(--success);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-delete {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-plans {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-plans:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Row Highlighting for Assignments */
.assignment-all-complete {
    background-color: rgba(251, 191, 36, 0.1) !important;
}

.assignment-partial-complete {
    background-color: rgba(59, 130, 246, 0.05) !important;
}

/* Results Counter */
.results-count {
    background: var(--primary);
    color: var(--text-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.results-summary {
    display: flex;
    gap: var(--space-sm);
}

.results-summary .results-count {
    min-width: 70px;
    text-align: center;
}

.active-count {
    background: var(--success);
}

.inactive-count {
    background: var(--secondary);
}

/* Light green font color for task ID cell (td) */
.admin-table td.task-id-cell {
    color: #22c55e !important;
    font-weight: 700;
    font-size: 15px;
    background-color: rgba(34, 197, 94, 0.05);
}