/* Admin Interface Styles */

/* User Management Specific Styles */
.admin-user-list .user-row {
    transition: background-color 0.2s ease;
}

.admin-user-list .user-row:hover {
    background-color: #f8fafc;
}

.admin-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.admin-stats-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.admin-stats-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* User status badges */
.user-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.user-status-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.user-status-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.user-status-badge.superuser {
    background-color: #ede9fe;
    color: #6b21a8;
}

.user-status-badge.staff {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Form enhancements */
.admin-form .form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.admin-form .form-section-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.admin-form .form-section-content {
    padding: 1.5rem;
}

/* Bulk actions */
.bulk-actions-bar {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.bulk-actions-bar select {
    min-width: 200px;
}

/* Search and filters */
.admin-filters {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-filters .filter-group {
    margin-bottom: 1rem;
}

.admin-filters .filter-group:last-child {
    margin-bottom: 0;
}

/* User actions */
.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-actions .btn {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.user-actions .btn-primary:hover {
    background: #2563eb;
}

.user-actions .btn-warning {
    background: #f59e0b;
    color: white;
}

.user-actions .btn-warning:hover {
    background: #d97706;
}

.user-actions .btn-danger {
    background: #ef4444;
    color: white;
}

.user-actions .btn-danger:hover {
    background: #dc2626;
}

.user-actions .btn-success {
    background: #10b981;
    color: white;
}

.user-actions .btn-success:hover {
    background: #059669;
}

/* Responsive design */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-filters {
        padding: 1rem;
    }
    
    .admin-filters .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .user-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation for loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* User detail page enhancements */
.user-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.user-detail-header h1 {
    margin: 0;
    color: #1f2937;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.danger-zone {
    border: 1px solid #fecaca;
    background: #fef2f2;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.danger-zone h3 {
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.danger-zone p {
    color: #7f1d1d;
    margin-bottom: 1rem;
}

/* Message styling */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.message.success {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #166534;
}

.message.error {
    background: #fef2f2;
    border-color: #dc2626;
    color: #991b1b;
}

.message.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.message.info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}