/* User Management Styles - Clean Design System */

/* Main container */
.um-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.um-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.um-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.um-body {
    padding: 20px;
}

/* Statistics Cards */
.um-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.um-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    text-align: center;
}

.um-stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.um-stat-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
    font-weight: 500;
}

/* Tabs */
.um-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.um-tab-button {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    background: none;
    border: none;
    font-size: 14px;
}

.um-tab-button.active {
    color: #4a6cf7;
    border-bottom-color: #4a6cf7;
}

.um-tab-button:hover {
    color: #4a6cf7;
}

.um-tab-content {
    display: none;
}

.um-tab-content.active {
    display: block;
}

/* Table Container */
.um-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.um-table-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background-color: #f8f9fa;
}

.um-search-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.um-search-container {
    position: relative;
    width: 200px;
}

.um-search-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.um-search-container input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

.um-filter-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.um-filter-container select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    min-width: 120px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.um-filter-container select:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

/* Table */
.um-table-wrapper {
    overflow-x: auto;
}

.um-table {
    width: 100%;
    border-collapse: collapse;
}

.um-table th,
.um-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.um-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.um-table td {
    color: #333;
    font-size: 14px;
}

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

/* User Info */
.um-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.um-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #ddd;
}

.um-user-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.um-user-details p {
    margin: 0;
    font-size: 12px;
    color: #777;
}

/* Badges */
.um-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.um-status-badge.active {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.um-status-badge.inactive {
    background-color: #f8e8e8;
    color: #5a2d2d;
}

.um-status-badge.pending {
    background-color: #fff8e1;
    color: #5a4d2d;
}

.um-status-badge.accepted {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.um-status-badge.expired {
    background-color: #f0f0f0;
    color: #666;
}

.um-role-badge.admin {
    background-color: #f8e8e8;
    color: #5a2d2d;
}

.um-role-badge.user {
    background-color: #e8f0f8;
    color: #2d3d5a;
}

.um-role-badge.viewer {
    background-color: #f0f0f0;
    color: #666;
}

/* Action Buttons */
.um-action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.um-action-btn {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    background: white;
    color: #666;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.um-action-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Pagination */
.um-pagination {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.um-pagination-info {
    font-size: 13px;
    color: #666;
}

.um-pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.um-pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    background: white;
    color: #666;
    min-width: 32px;
    text-align: center;
}

.um-pagination-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.um-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.um-pagination-btn.active {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.um-page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.um-page-size-selector select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

/* Buttons */
.um-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.um-btn-primary {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.um-btn-primary:hover {
    background-color: #3a5ce4;
    border-color: #3a5ce4;
}

.um-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border-color: #ddd;
    margin-right: 10px;
}

.um-btn-secondary:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* Modals */
.um-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.um-modal.active {
    display: flex;
}

.um-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.um-modal-overlay.active {
    display: block;
}

.um-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1001;
}

.um-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.um-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.um-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #777;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.um-close-btn:hover {
    color: #333;
    background-color: #f0f0f0;
}

.um-modal-body {
    padding: 20px;
}

.um-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles */
.um-form-group {
    margin-bottom: 15px;
}

.um-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.um-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.um-form-control:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

/* Loading */
.um-loading {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.um-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    animation: umSpin 1s linear infinite;
}

@keyframes umSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.um-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.um-toast {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    animation: umSlideIn 0.3s ease forwards;
}

.um-toast.success {
    background-color: #e8f5e8;
    border-left: 4px solid #28a745;
    color: #2d5a2d;
}

.um-toast.error {
    background-color: #f8e8e8;
    border-left: 4px solid #dc3545;
    color: #5a2d2d;
}

.um-toast.info {
    background-color: #e8f0f8;
    border-left: 4px solid #17a2b8;
    color: #2d3d5a;
}

@keyframes umSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .um-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .um-stats-container {
        grid-template-columns: 1fr;
    }
    
    .um-table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .um-search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .um-search-container {
        width: 100%;
    }
    
    .um-filter-container {
        justify-content: stretch;
    }
    
    .um-filter-container select {
        flex: 1;
        min-width: auto;
    }
    
    .um-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .um-modal-footer {
        flex-direction: column;
    }
    
    .um-btn {
        width: 100%;
        justify-content: center;
    }
    
    .um-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .um-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}