/* Users Section Styles */
/* Global body styles now in global.css */

/* Add User button styles now in admin-sections-shared.css */

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.users-header h1 {
    color: #333;
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
    font-family: 'Inter Tight', sans-serif;
}

/* Table container and common table styles now in admin-sections-shared.css */

#users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#users-table th,
#users-table td {
    text-align: left;
    vertical-align: top;
}

#users-table tbody tr {
    transition: all 0.2s ease;
    cursor: move;
}

#users-table tbody tr.user-row:hover {
    background-color: #f8f9fa;
}

#users-table tbody tr.user-row.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

#users-table tbody tr.user-row:not(.drag-placeholder) {
    cursor: grab;
}

#users-table tbody tr.user-row:not(.drag-placeholder):active {
    cursor: grabbing;
}

#users-table tbody tr td {
    border-bottom: 1px solid #e9ecef;
}

/* Status styling */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-on-hold {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Actions column */
.actions-cell {
    white-space: nowrap;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.action-btn.edit {
    color: #007bff;
}

.action-btn.edit:hover {
    background-color: #e7f3ff;
}

.action-btn.delete {
    color: #dc3545;
}

.action-btn.delete:hover {
    background-color: #fdeaea;
}

/* Modal Styles - using global modal styles from global.css */

.user-form {
    padding: 0 24px 24px 24px;
}

.ReactModal__Content {
    background-color: transparent !important;
}


/* Color picker styles */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-container input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 4px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.color-picker-container input[type="color"]:hover {
    border-color: #667eea;
}

.color-hint {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

/* Form actions and buttons - using global styles from global.css */

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .users-header h1 {
        font-size: 2em;
    }

    .table-container {
        margin-top: 15px;
    }

    #users-table th,
    #users-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 30px;
}

/* Error state */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Profile picture styles */
.profile-pic-cell {
    width: 50px;
    padding: 8px;
    text-align: center;
}

.user-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#users-table tbody tr:hover .user-profile-pic {
 
    transform: scale(1.05);
}

.user-profile-pic-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea; /* Fallback color, will be overridden by navigation hover gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
   
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#users-table tbody tr:hover .user-profile-pic-placeholder {
    border-color: #666;
    transform: scale(1.05);
}

/* Modal profile picture styles */
.modal-profile-picture-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.modal-user-profile-pic,
.modal-user-profile-pic-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
}

.modal-user-profile-pic-placeholder {
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Drag and drop styles */
.drag-placeholder {
    opacity: 0.3;
    background-color: #e3f2fd;
}

.drag-ghost-wrapper {
    opacity: 0.85;
    filter: drop-shadow(0 4px 16px rgba(102, 126, 234, 0.3));
}

.drag-ghost {
    background-color: white;
}

/* Drop indicator line */
.drop-indicator {
    position: fixed;
    height: 3px;
    background-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
    pointer-events: none;
    z-index: 10000;
    border-radius: 2px;
    animation: dropIndicatorPulse 1s ease-in-out infinite;
}

@keyframes dropIndicatorPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Prevent text selection during drag */
tr.user-row.dragging * {
    user-select: none;
}