/**
 * User Management Styles (feature 003)
 * Styling for user creation, listing, and deletion
 */

/* User Management Container */
.user-management {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.user-management__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-management__header h2 {
    color: #2d7a3e;
    margin: 0;
}

/* Filters */
.user-management__filters {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-management__filters label {
    font-weight: 600;
    color: #333;
}

.user-management__filters select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* User Form */
.user-form {
    padding: 1.5rem;
}

.user-form .form-group {
    margin-bottom: 1.5rem;
}

.user-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.user-form .form-group input,
.user-form .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.user-form .form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

.user-form__actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* User Table */
.user-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.user-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.user-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

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

.user-table td {
    padding: 1rem;
    color: #333;
}

.user-table td:last-child {
    text-align: right;
}

.user-row__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.813rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge--primary {
    background-color: #2d7a3e;
    color: white;
}

.badge--secondary {
    background-color: #6c757d;
    color: white;
}

.badge--success {
    background-color: #28a745;
    color: white;
}

.badge--warning {
    background-color: #ffc107;
    color: #333;
}

.badge--danger {
    background-color: #dc3545;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.pagination__info {
    color: #666;
    font-size: 0.938rem;
}

/* Success Modal */
.modal--success .modal__body {
    padding: 1.5rem;
}

.modal--success .modal__title {
    color: #28a745;
}

.credentials-box {
    background: #f8f9fa;
    border-left: 4px solid #2d7a3e;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.credentials-box code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #2d7a3e;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
}

.info-message {
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin: 1rem 0;
}

/* Loading & Empty States */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.125rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.125rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-management {
        padding: 1rem;
    }

    .user-management__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-management__header h2 {
        font-size: 1.5rem;
    }

    .user-table-wrapper {
        font-size: 0.875rem;
    }

    .user-table th,
    .user-table td {
        padding: 0.75rem 0.5rem;
    }

    .user-table th {
        font-size: 0.75rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .user-form__actions {
        flex-direction: column;
    }

    .user-form__actions button {
        width: 100%;
    }
}
