/* 用户管理界面样式 */
.user-management-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 1000px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.user-management-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.close-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* 用户统计 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* 用户管理操作按钮 */
.user-management-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-btn {
    background: #28a745;
    color: white;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.refresh-btn {
    background: #17a2b8;
    color: white;
}

.refresh-btn:hover {
    background: #138496;
    transform: translateY(-2px);
}

.delete-btn {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
}

.delete-btn:hover {
    background: #c82333;
}

/* 用户列表 */
.user-list {
    margin-top: 20px;
}

.user-list-header h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

.user-table {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr 1.5fr 1fr 1fr;
    background: #f8f9fa;
    padding: 12px;
    font-weight: bold;
    color: #495057;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr 1.5fr 1fr 1fr;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    align-items: center;
    font-size: 13px;
    color: #333;
}

.table-row span {
    color: #333 !important;
}

.table-row:hover {
    background-color: #f8f9fa;
}

.table-row:last-child {
    border-bottom: none;
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333 !important;
}

.user-avatar {
    font-size: 16px;
}

.current-user-badge {
    background: #007bff;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.user-role.admin {
    color: #dc3545;
    font-weight: bold;
}

.user-role.user {
    color: #28a745;
}

.user-status.active {
    color: #28a745;
}

.user-status:not(.active) {
    color: #dc3545;
}

.user-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-disabled {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.no-users {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-management-container {
        width: 95vw;
        padding: 16px;
        max-height: 90vh;
    }
    
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        display: block;
        padding: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .table-row > span {
        display: block;
        margin-bottom: 4px;
    }
    
    .table-row > span:before {
        content: attr(data-label) ': ';
        font-weight: bold;
        color: #495057;
    }
    
    .user-management-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
}